Bars seen and bars considered

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #13335 quote
    Renato Di Lorenzo
    Participant
    Average

    Hi everybody.

    Let me ask a question.

    Using the command on top of each graph, one can vary the number of bars observed (200 for instance). However, launcing a backtest from “the earliest date displaied” the baktest is not carried on the 200 bars chosen, but it is always started at the same past date whatever is the number of bars one has chosen to display.

    Is there a way to limit the backtest to the number of bars (say 200) one has chosen to observe?

    Thanks.

    Renato

    #13337 quote
    Nicolas
    Keymaster
    Master

    You can select “from date / to date” to limit the tested bars in backtest.

    #13338 quote
    Renato Di Lorenzo
    Participant
    Average

    I know, but is there a way to use the bar numbers instead of the dates? when making a statistics it’s cumbersome to use the dates

    thanks

    #13356 quote
    Nicolas
    Keymaster
    Master

    When you open your chart, choose 200 units. Don’t de-zoom/magnify! and launch your backtest with the earliest date displayed. It should work.

    earliest-date-displayed-backtest-prorealtime.png earliest-date-displayed-backtest-prorealtime.png
    #13367 quote
    Renato Di Lorenzo
    Participant
    Average

    This is exactly the problem, Nicholas: it doesn’t.

    Now: 20 september 2016 1:00 PM; asset: South Africa 40 at 3 minutes, 200 units; the graph as I see it starts correctly 200 bars before on 20 september 2016 3:18 AM. But after the backtest the vertical black line on the equity line is reported on 19 september 2016 1:03 AM and the equity line itself starts on 19 september 2016 8:50 AM. I do not understand.

    #13368 quote
    Renato Di Lorenzo
    Participant
    Average

    If a new run is launched back from the beginning with 1000 units instead of 200, the same phenomenon happens: the equity curve starts 24 hours in advance from the first date and hour displaied on the graph.

    #13370 quote
    Nicolas
    Keymaster
    Master

    Please add this line to your code and make another test to see if the “24h in advance” still occur:

    defparam preloadbars=0
    #13387 quote
    Renato Di Lorenzo
    Participant
    Average

    Yes Nicholas, I had already done this addition and the result had been the same as before. Any other idea?

    #13388 quote
    Nicolas
    Keymaster
    Master

    Decay the start date to the next day.

    #13389 quote
    Renato Di Lorenzo
    Participant
    Average

    Sorry: what do you mean?

    #13390 quote
    Renato Di Lorenzo
    Participant
    Average

    Let’s summarize a bit: to make my statistics I need to tell the system: “optimize only on the last 200 bars, no one more, no one less”. Maybe PRT does not allow such a standard operation, but it seems to me quite unlikely.

    #13391 quote
    Nicolas
    Keymaster
    Master

    This is an idea, add this line to your code:

    GRAPH BARINDEX

    and subtract the end barindex number by the start one and you’ll find how much bars are tested. Then change your start date accordingly to how much bars you want to be tested by your strategy. Hope that helps.

    barindex-limit-backtest.png barindex-limit-backtest.png
    #13416 quote
    Renato Di Lorenzo
    Participant
    Average

    The idea in essence should have worked, but unfortunately it did’nt.

    This is obviously a bug in the Platform that should be signalled and we have tried some patches without success.

    I thank you very much for your time, but I feel it should not expedient to make still more efforts on a subject that with evidence is intractable.

    Best of all

    #13417 quote
    Nicolas
    Keymaster
    Master

    Why not? Got 200 bars in 1 hour timeframe from August 31st to now. See example attached.

    I don’t feel it’s a bug, I think this is something that is not implement. I don’t see anywhere a bar quantity selection to contain a backtest within this value.

    200-bars-probacktest.png 200-bars-probacktest.png
    #13428 quote
    Renato Di Lorenzo
    Participant
    Average

    Well, you may call it a bug or not, but neither me nor you could solve the problem of which I have given ample specifications.

    Best

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.

Bars seen and bars considered


ProOrder: Automated Strategies & Backtesting

New Reply
Summary

This topic contains 16 replies,
has 2 voices, and was last updated by Renato Di Lorenzo
9 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/20/2016
Status: Active
Attachments: No files
Logo Logo
Loading...