Simulation does not run till the last bar

Posted By: Ger1

Simulation does not run till the last bar - 03/30/18 23:45

Hi,

I am trying to test a strategy on "AAPL", and "BFB". For BFB I got data till 20180308, for AAPL till 20180330. As per the manual "The first asset in a script is used to create the array of bars".
When I run both assets together the simulation stops on 20180308, even though I've called "AAPL" first.

I've used following parameters:

LookBack = 0;
BarPeriod = 1440;
StartDate = 20180101;
EndDate = 20180330;

while(asset(loop("AAPL","BFB")))
{
printf("nBar %i of %i",Bar,NumBars);
}


The total number of bars (NumBars) is according to AAPL's history (57 bars) but then the simulation stops at the end of BFB's history (44 bars).
That's the last output I got:
Bar 44 of 57


Could anyone shed some light on this and on how to run the simulation till the end of AAPL's history?

Thanks.
Posted By: Ger1

Re: Simulation does not run till the last bar - 04/12/18 22:28

Anyone got an idea on how to run the simulation until EndDate?

The only way I found so far is checking every single asset history file if it got data till the EndDate and then deleting it, which is a bothersome process if you want to test a few hundred stocks together.
© 2024 lite-C Forums