screening a strategy on each stock of us 500

Forums ProRealTime English forum ProScreener support screening a strategy on each stock of us 500

Viewing 8 posts - 1 through 8 (of 8 total)
  • #66438

    Hi, I was wondering if there is any way to screen a strategy on every single shares of the SP 500.

    Just to be clear. I want to see if a mean reverting strategy that works well on the SP 500 could be applied to a basket of stocks instead than to the whole index. It would be interesting to see if there is a particular basket that contribute to the “mean revertingness” of SP 500 and isolate it.

    Many thanks

    Francesco

    #66439

    We could simulate profit generated by a strategy of each individual stock of a shares list.. but it would be tricky, depends of the strategy itself! and it would only be possible on the last 254 bars (history limitation of ProScreener).

    If you could expose the strategy (or the probacktest code), I could lend an hand 🙂

    #66444

    Thank you Nicolas,

    the strategies I had in mind are the one that we published on the SP 500

    https://www.prorealcode.com/prorealtime-trading-strategies/sp-500-daily-rsi2-long-short-strategy/

    and

    https://www.prorealcode.com/prorealtime-trading-strategies/sp-500-reverting-strategy/

    Let me know if you think you can work something out of them and if I can do anything to help

    Thank you!

     

     

    #66462

    Quick example of the first one converted into a screener:

    Your a and b variables are optimized in ProBacktest, so I took dummy values for them. The gain is in points, not in money, depends of shares quantity you bought for each stock of course ..

    1 user thanked author for this post.
    #66463

    Wait a minute, I think I made something wrong..

    1 user thanked author for this post.
    #66464

    Hmmm, please review my code, I think it should be good now 🙂

     

    #66465

    Thank you Nicolas, the code is fine but I am not very confident with screeners. Let me understand, if I select “daily” screening the resultsa  are computed on the last 2 years right?

    #66471

    Yes, beginning 254 bars ago from now.

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login