Hello,
For my algo to work, all my data points must be in an aggregation period of 5 minutes.
It is important for the MACD settings I have that each chunk of data is 5 minutes.
Anyone know how to make this happen?
Thank you.
Hello,
For my algo to work, all my data points must be in an aggregation period of 5 minutes.
It is important for the MACD settings I have that each chunk of data is 5 minutes.
Anyone know how to make this happen?
Thank you.
Hi Dante,
You can convert your history to 5 minute frequency using the pandas resample
method similar to what is described in this thread response.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.
Hi Jamie!
Thank you so much again for reaching out and offering your help! I am so very grateful! Peace and blessings!!!
Jamie,
I am unsure of how to calculate for 5 minutes instead of 15. What do these numbers mean?
closes = history(390 * 30, "1m", "close_price").resample("15min")
Thanks,
Dante
WAIT! I think I got it.
prices = history(390 * 30, "1m", "close_price").resample("5min")
because the resample is part of pandas, i can just type in 5 instead of 15, yes?
and 390 is the total minutes in a trading day. still don't know why its multiplied by 30 though?? I only count 26 15 minute actions to a day... hmmm
would like to understand fully how this is working.
Thanks!
Hi Dante,
It looks like you're getting there! Check out this tutorial video on how the history()
function works and the pandas documentation on resample()
to get a better understanding of how these functions work.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.