Posting backtest & code for error analysis.
Posting backtest & code for error analysis.
Grant, I am still baffled. I can clone this and run this. Obviously, you're hitting something wrong, so I just have to keep digging.
Sorry for the difficulty here. I apologize.
Dan
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.
Here's the run that I got:
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.
Thanks Dan,
I extended the range of dates a bit, and re-ran the algorithm (see attached). The first line of the log output:
1970-01-01initialize:13INFOuniverse is 98 to 98.1
2013-05-06PRINT ----------------------------
2013-05-06PRINT2013-05-06 13:31:00+00:00
2013-05-06PRINT ----------------------------
2013-05-06PRINT Securities
2013-05-06PRINT[448, 25090, 42788, 23881, 19662, 4922, 1595, 39546]
2013-05-06PRINT Current prices
2013-05-06PRINT[ 75.16 75.41 62.62 121.34 55.5 107.82 20.93 61.81]
2013-05-06PRINT Trailing price window
2013-05-06PRINT[[ 75.25 75.21 62.14 121.16 55.51 107.82 19.922 60.94 ] [ 75.24 75.23 62.15 121.22 55.53 107.8 19.91 60.95 ] [ 75.16 75.41 62.62 121.34 55.5 107.82 20.93 61.81 ]]
The backtest was run on minute data, so I'm confused why I don't get something like 3*390 data points for each security (looks like there are only 3, as if daily data are being used). In minute mode, shouldn't a batch transform window length of 3 yield 3*390 data points?
Grant
Hi Dan,
Basically, I'd like to obtain a trailing window of minute bars updated every minute. Is this feasible? The documentation is not so clear, and I can't seem to get the batch transform to work. If I'm not mistaken, I used to be able to get a trailing window of 390 minute bars with a batch transform window length of 1, and the window would slide forward every minute, with a refresh period of 0. Perhaps I'm off in the weeds, but it seems like something has changed.
Grant
I think that you're right, Grant, and I'm not sure it was intentional. If I can't get an answer tomorrow, I certainly will on Monday.
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.
Dan,
No rush...I'm just tinkering around...I was curious about the batch transform speed-up. It appears that now, with minute data, the trailing window is specified in units of minutes. For example, when I set the window length to 5 and the refresh period to 0, I get a trailing window of 5 minutely bars:
2013-04-23PRINT ----------------------------
2013-04-23PRINT2013-04-23 16:34:00+00:00
2013-04-23PRINT ----------------------------
2013-04-23PRINT Securities
2013-04-23PRINT[448, 25090, 42788, 23881, 19662, 39546, 1595, 4922]
2013-04-23PRINT Current prices
2013-04-23PRINT[ 70.4998 74.583 60.6299 121.87 54.069 59.55 18.121 106.93 ]
2013-04-23PRINT Trailing price window
2013-04-23PRINT[[ 70.49 74.59 60.54 121.8647 54.05 59.55 18.103 106.93 ] [ 70.51 74.6 60.53 121.8665 54.0484 59.5 18.1 106.93 ] [ 70.49 74.6 60.49 121.87 54.055 59.51 18.11 106.94 ] [ 70.47 74.58 60.54 121.87 54.0612 59.56 18.1127 106.92 ] [ 70.4998 74.583 60.6299 121.87 54.069 59.55 18.121 106.93 ]]
2013-04-23PRINT ----------------------------
2013-04-23PRINT2013-04-23 16:35:00+00:00
2013-04-23PRINT ----------------------------
2013-04-23PRINT Securities
2013-04-23PRINT[448, 25090, 42788, 23881, 19662, 39546, 1595, 4922]
2013-04-23PRINT Current prices
2013-04-23PRINT[ 70.5 74.6 60.67 121.87 54.06 59.54 18.14 106.92]
2013-04-23PRINT Trailing price window
2013-04-23PRINT[[ 70.51 74.6 60.53 121.8665 54.0484 59.5 18.1 106.93 ] [ 70.49 74.6 60.49 121.87 54.055 59.51 18.11 106.94 ] [ 70.47 74.58 60.54 121.87 54.0612 59.56 18.1127 106.92 ] [ 70.4998 74.583 60.6299 121.87 54.069 59.55 18.121 106.93 ] [ 70.5 74.6 60.67 121.87 54.06 59.54 18.14 106.92 ]]
No problem...this may be an improvement, since it allows for optimization...no need to always return 390 bars, when fewer may be needed.
By the way, when I do try 390 for the window length, it seems like the algorithm hangs...I'll fiddle around a bit more.
Grant
Updating here as well, (since there are multiple threads.)
We've restored the behavior of window_length in minute mode to mean 390 * window_length, i.e. the window is described in days but filled with minute data.
The fix in Zipline can be seen here, https://github.com/quantopian/zipline/commit/b87d454938388919a034d3b378cad070ab39c828
Thanks for helping us spot it!
(And we agree that there is/was a gap in Zipline where sometimes only the daily case for a certain behavior is tested. Both Thomas and I will be working to help rectify that situation.)
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.