Back

Strange data in the logs (forex)

Hello,

To understand the backtesting engine, I run a very simple test - just printing the price of a security at a certain time of each day. The logs are confusing at the beggining (see below). There are two entries per day with the price of 0. Afterwards they make sense. What is the meaning of these entries?

Thanks!

2015-01-02 00:00:00 Fired at: 1/1/2015 3:55:00 PM, Price: 0

2015-01-02 15:55:00 Fired at: 1/2/2015 3:55:00 PM, Price: 0

2015-01-04 00:00:00 Fired at: 1/3/2015 3:55:00 PM, Price: 0
2015-01-04 17:01:00 Fired at: 1/4/2015 3:55:00 PM, Price: 0
2015-01-05 15:55:00 Fired at: 1/5/2015 3:55:00 PM, Price: 1.194455
2015-01-06 15:55:00 Fired at: 1/6/2015 3:55:00 PM, Price: 1.18986
2015-01-07 15:55:00 Fired at: 1/7/2015 3:55:00 PM, Price: 1.183345
2015-01-08 15:55:00 Fired at: 1/8/2015 3:55:00 PM, Price: 1.178975

Update Backtest








The prices are zero, because the algorithms starts in a day that the exchange is closed: January 1st.
However, we use the price from the previous day (December 31st) for seeding, so that prices are not zero at start.
We are going to look into it ASAP.

It is also showing logs from dates that the exchange is closed.
To avoid that, we need to specify the symbol in the DateRules.EveryDay method:

Schedule.On(DateRules.EveryDay("EURUSD"), TimeRules.At(15, 55), DailyAction);

On Sundays, the exchange is open, but after 15:55, so we are going to get a call right after the exchange open. E.g.:

2015-01-11 17:01:00 Fired at: 1/11/2015 3:55:00 PM, Price: 1.184315
2015-01-12 15:55:00 Fired at: 1/12/2015 3:55:00 PM, Price: 1.183425
0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed