Back

Sessions and length of the simulation

How long does a user session lasts.

If a simulation is running in the background, it appears that your session can still be closed before the simulation finished. Should that be the case?

Or rather may be a simulation is kept in a state_so_far and queued up. Which I think what it tires to do. However I am unsure whether the simulation state so far is kept or revert back to when the user logs in again (i might be wrong). Instead the simulation seems to start from the start date. At least that is the feeling I get from the Status (i.e. progress) header.
Update Backtest








Also does the Series simulation time out by any chance. where start and end dates are defined as follows:

startDate = new DateTime(2000, 01, 01);
endDate = new DateTime(2012, 05, 31);

Now I make only one trades (long only) per month.
0

Hey @Joyanta, the simulations will complete regardless if you're logged in and any you haven't opened yet will popup when you reload the project.

There was a long standing bug in session login period where it wasn't looking at your session cookies and just the browser session (much shorter). I've pushed a fix for this so hopefully that will solve it.
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.


Just to confirm if I have very long "series" simulation. I can just start it, log off and log in at a later time?.

Joyanta
0

Correct - they'll run in the background no matter what. The infrastructure is already in place so I'll make it send you an email with the results when its done if you haven't deleted the simulation.

You can do all this via GIT as well - commit and push your code on GIT, and it will email you the results once the simulation is completed.
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.


Hi,

I will try to set up the git stuff going this weekend.

The simulation result for simul ID: de85f099-374e-4671-a7a3-0d9f28477198 doesn't open. It is a long one and I really went for it with sim configuration of 3648 days, series!!!

bd256609-ba78-4b74-8569-f8ac884f6881 with 1385 days is actually fine.

J
0

I just ran the same test last night :) Thanks for pointing it out, we'll put together a fix today. Its a lot of data so might be a memory issue.
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.


yeah sorry, not making it easy for your guys...ho ho ho.
0

@Joyanta, done! :) And I made it about 300% faster for series analysis as well -- you can run a 15 year backtest in 4-5 minutes! Jan1st 1998 -> December 30th 2012. 3700 trading days.

I tested with 2 trades per day - 7000 trades total, and added in some smarts to reduce the total information sent back to browser when its a long-term simulation.

If you want to see details rerun the simulation over the specific days and it will automatically send back a higher resolution! :)
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.


PS: Remember you can run simulations in parallel. No need to wait for one to complete before you start the next experiment.

We're close to dynamic charting.. last few bits left. For now its still best to test the simulation with a small window (30days) and then scale up once its working on a test set. This way you can prove strategy logic before a longer simulation.
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.


great work!!!

It is faster and works really well.

I have just tested the result against earlier results (i.e. earlier slower simulation) and the trades are exactly the same and result.
0

with regards to PS: simulations in parallel, you are referring to the strats for which one does not keep over night position (i.e. no memory right)?

Yeah dynamic charts would be awesome.
0

I mean (regardless of RunMode Series/Parallel) you can click simulate button; adjust a variable you want to optimize, build, and then click simulate again 5 seconds later :)

E.g. You want to optimize the time of day you're sending in orders, so send off 5 simulations from 10am->3pm. They'll all process in parallel and you'll get a slightly different chart and order times for each.

At the moment each day of minute is allocated 10 sec processing time on the backend, so a 3700 day simulation has a maximum of 37,000s runtime = 10.2 hours. If just doing basic things you should never come close to this, but AI algorithms, or complex loops may need the extra time.
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.


I only want to test for a trade once a day towards the end of the market session. Is there any way to do this, so the simulation is as fast as possible?
0

@Ric - I'd request minute data, and just "return" until the time period you want to look at.

We're building a "filter" API to select periods of the day but its still 2-4 weeks away.
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.


Actually @Ric -- for your application -- would you like Resolution.Daily?

We currently have Resolution.Minute, Resolution.Second and Resolution.Tick but it makes sense to have daily bars and shouldn't be too much work to add them.
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.


Perhaps, but I'm not sure if Daily would work. I would like to be able to evaluate the market twice, once in the morning to evaluate the possibility of a trade signal, and once at around 3:00, to make a decision if a trade should be done prior to market close. I think this is common for slower systems to do similar things. Perhaps if I could choose daily and wake myself up at pre-determined times, to check the latest values, and have the daily values for a partial day while the market is open. But I hesitate a bit to restrict myself to only daily values, because perhaps I will need them to manage moving into a trade.
It would also be nice to have easy ways to get the daily series of high low close values, for calculation of various daily based statistics. Some systems I have used pre-calculate a number of standard sma's etc for each symbol, to avoid having everyone doing it themselves and wasting cycles.
0

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