Seasonality Analysis with In Sample and Out of Sample and Monthly Rating

v10.3
Seasonality Analysis with In Sample and Out of Sample and Monthly Rating

This is a further development of my Seasonality Analysis Indicator that analyses historical data month by month to test for the seasonality of any market.

Apply only on Monthly charts.

In this version you can select a period to be tested as in sample and  a period to be tested as out of sample. Comparison of the two allows more accurate analysis of the results.

You can set any number of years for each sample period but be aware that short data samples will not include much data. For example there are only five of each month in a five year sample.

You must set the current month before each test. 1 = Jan and 12 = Dec.

If you set fifteen years for the in sample and ten years for the out of sample then the analysis will start twenty five years back from today. The in sample will be tested on the first fifteen years and and the out of sample on the last ten.

The results you are interested in are the last ones under the current months candle and I suggest making the indicator window full size to make it easier to read.

The result categories are as follows:

Return: The average pips return in that month over the period tested. If you had opened a long bet at the beginning of that month and closed it at the end of that month every year then this is how much you would have gained or lost on average each month.

Rank%: The best performing monthly average return and the worst performing monthly average return are ranked at 100% and -100%. All months in between are given a ranking% relative to these. This is useful if you want to alter position sizing in a strategy month by month based on seasonality. You might want to place position size of 100% of your maximum bet size in months rated at 100% and only 33% in months rated 33% for example.

Reliability%: The number of up months and number of down months are totalled up and a reliability percentage calculated. For example if you test over 10 years and have ten tests of January and January’s results favour long positions then if 7 of those months see a gain and 3 a loss then the reliability is 70%. You may wish to only go long in months with a Reliability% of over 70% for example.  This reliability% helps you decide the probability of future results matching historical results.

Rating Score: The in sample and out of sample Rank% and Reliability% are combined and converted into this score. Twice as much weight is given to the more recent out of sample data. A very low score indicates a very good month to enter short trades and a very high score a very good month to enter long trades. The rating can also be used to decide on position size and preferred trade direction for trades month by month. This rating system is unproven and will obviously vary depending on the length of sample periods chosen – so use at your discretion.

If this indicator is used alongside my other two indicators Seasonality Analysis and Seasonality Analysis Graph then any trader should be easily be able to make good decisions on when is a good time to trade long or short and whether to increase or decrease position size month by month for any market where sufficient data is available.

I advise downloading and importing the .itf file to ensure that you get full functionality.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Alai-n • 64 days ago #

    Hello Vonasi, In the same spirit as this table would you have something similar to analyze on daily data. In order to determine in the long run if a Monday is rather hauled or lowered, Tuesday, Wednesday etc .

  2. Vonasi • 64 days ago #

    Sorry but I don’t have anything like that at the moment. This thread might be of interest to you though https://www.prorealcode.com/topic/investor-behavior/page/2/ . I have put on there a strategy that can be run to analyse buying at each hour of each day and then selling after a preset length of time. You can use this to work out which days and which hours have been historically better times to trade long.

  3. Alai-n • 63 days ago #

    Too bad for my question … 😉 And thank you for the link!

  4. ALE • 39 days ago #

    Very Very Good!

  5. Vonasi • 39 days ago #

    Thanks for the compliments ALE. If you use any results from it in a strategy then please share as you usually do!

  6. CKW • 33 days ago #

    this is Awesome tool. thanks Vonasi

  7. Vonasi • 32 days ago #

    ….and thank you for the compliment CKW.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Vonasi There is another very minor bug fix. The indicator description when you hover over the speec...
Reiner great work:-)
Vonasi Thanks Reiner. that is compliments indeed from the seasonality expert. I have a second vers...
Yannick TradingDayLong = dayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayof...
Marlon Hey JohnScher, your code works fine, but my results aren't as good as yours. Even if I use ...
DarioMazza Bha... this code dont work. gg
Reiner
2 years ago
Nicolas You should join and read the forum thread about this strategy. There are plenty of different...
Reiner Hi djtaktik and welcome, I have answered your question in the related Pathfinder forum beca...
danver34 is this version the definitive one or from the original one have there been modifications to...

Top