The end-of-month effect

Viewing 4 posts - 1 through 4 (of 4 total)
  • #239276

    Hi all,

    I want to  go long at the close on the fifth last trading day of the month, and exit at the close of the third trading day of the next month. Anyone able to make script for this strategy?

    1 user thanked author for this post.
    #239296

    Hi! here you have a code. It must be backtested in daily timeframe.

    4 users thanked author for this post.
    #239307

    Thanks, Ivan!😃

    #247562

    Hi,

    finally I came to test this day counting algo, and realized that it works perfectly for months which do not contain any exchange holidays, and so it does not count correctly for the months with exchange holidays. for this moment I assume there is no real posibility to consider in the algo correctly those months with exchange holidays: for that we would need to have “in the background” all exchange holidays of the past (for the backtesting)  and for the future (for live implementation), for specific exchange, right? I assume still one could do it manually: collect past exchange holidays manually (or let collect them by AI if one trusts AI :-D) and put them in the code…

    so I will probably collect exchange holidays for my exchange of interest, but anyway – I still don’t have an idea, how to consider them in the code, so counting runs correctly. do you have and idea, Ivan? or anybody else? I mean, if let’s say 1st of May is exchange holiday and this day in the year xyzw is not on weekend, how could I possibly tell it in the code, so counting is adjusted?

    thanks,

    justisan

Viewing 4 posts - 1 through 4 (of 4 total)

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