Calendar Anomalies (3/3) ForecastCycles sections and features
The list of the pages about Anomalies:
-
Anomalies ranking: contains the list of the anomalies and their statistical significativity, both in net and gross returns.
-
Anomaly details: contains the backtest of the anomaly (net and gross equity lines, table with statistics) in the In-sample, out-of-sample and entire period, with distinct statistics for gross and net returns.
-
My Anomalies: contains the anomaly you saved.
-
Customize an Anomaly: starting from an anomaly, you can create and save a variation, by changing SL, TP and/or trading costs.
-
Optimize an anomaly, starting from an anomaly, you can search for the best combination of Stop Loss and Take Profit among different modalities (in percentage, in price distance etc.).
-
Portfolios: it is possible to create portfolios, which are containers of anomalies. In this page you will able to filter for many metrics (Avg Return, Reward / Risk, Stability of equity line etc.) to find the best portfolios of all the web-site users.
-
Portfolio details: to see the backtest of the portfolio, with net equity lines and statistics.
-
Compare Portfolios: to compare the performance and the backtest metrics of two or more portfolios.
-
Portfolio Trading Calendar: to create the trading calendar of one of your portfolio, pair your telegram account to FC bot, in order to receive notifications when your portfolio will open and close a position.
Anomalies
- Anomalies ranking: contains the list of the anomalies. It is possible to:
- search for specific instruments, e.g., to find just 'Apple' and 'Amazon' anomalies.
- filter by instrument info, e.g. by asset class (stock indices, bonds, etc.), sector (financials, energy, etc.), size (large cap, small cap), etc.
- filter by anomalies' statistics, e.g., net avg annualized return >= 10% and stability of equity line >= 90%.
- filter for gross and/or net statistic parameters, e.g., avg gross return and/or avg net return. To compute net returns, we used average trading cost for each instrument, considering commission, bid-ask spread and overnight fee.
- Save template, to save the set of filters you have created, to load it the next time.
- Save an anomaly in 'My Anomalies', to access them quickly.
- See anomaly details, to see the backtest of the anomaly, in the 'Anomaly details' page.
- Anomaly details: This page contains the backtest of the anomaly. it is possible, also from here, to save the anomaly in 'My Anomalies'. The page contains:
- Equity line chart: with the gross and the net equity lines
- Table with statistics: a table with many statistics, such as avg return, stdev, Reward/Risk ratio, Profit factor, Sharpe ratio, Sortino ratio, scores of statistical significativity, etc. it is also possible to see distinct statistics for:
- Gross and/or net: statistics computed using gross and/or net returns.
- IS, OS, ALL: distinct statistics for the in-sample, out-of-sample and entire periods.
- Score to others the statistical significativity of the anomaly's returns versus the 'other periods' returns of the same instrument. For example, how much significant is a positive Friday of Gold, with respect to the other weekdays (Mon, Tue, Wed, Thu).
- Score to zero it says how much we can be confident that the anomaly's returns are statistically different from zero. The 'scores' are computed using statistical test, such as the t-test or non-parametric ones, chosing the most appropriate according to returns distributions.
- My Anomalies: this page contains the anomaly you saved. It is possible to:
- Delete an anomaly you previously added.
- Customize an anomaly, starting from an anomaly, you can set these parameters (SL mode, SL value, TP mode, TP value, commission %, bid-ask spread %, overnight fee %) to see the results and save it, creating a new anomaly, that you can add to one of your portfolio. We applied average trading costs, but you can use a broker which has such different costs for a particular instrument.
- Optimize an anomaly, finding the best stop loss and take profit, setting the modality of them (in price distance, in percentage, multiple of past average range).
- Add an anomaly to 'My Portfolio': Add an anomaly to one of your portfolio you created in 'My Portfolios'
- Customize Anomaly: starting from an anomaly, you can create a variation of that anomaly by changing one or more parameters among these: SL mode, SL value, TP mode, TP value, commission %, bid-ask spread %, overnight fee %) to see the results and decide whether to save it into 'My Anomalies'. To explain the parameters:
- Stop Loss and Take Profit
- SL_mode: you can chose among different type of Stop Loss.
- No Stop Loss
- In percentage: for example, in a long trade, if the entry price is 100$ and the SL_value is 1%, the stop loss will be set to price 99$.
- In price distance: for example, in a long trade, if the entry price is 100$ and the SL_value is 1, the stop loss will be set to price 99$.
- In average daily range multiple: for example, in a long trade, if the entry price is 100$, the SL_value is 1, and the average daily range of that instrument in the last 50 days has been 1$, the stop loss will be set to price 99$. Otherwise, if the SL_value is set to 2, the stop loss will be 98$.
- SL_value: is the value of the stop loss, according to its mode. Read the examples in the 'SL mode' descriptions to understand its use.
- TP_mode and TP_value: the same description written in the SL_mode and SL_value description.
- SL_mode: you can chose among different type of Stop Loss.
- Trading costs We applied, for each instrument, average trading costs, computed by looking at different tradable instruments in different brokers, and by applying to non-tradable instrument trading costs equal to the ones of similar tradable-instruments. But you may be using a broker that offers an instrument with different trading costs, so you can change the default ones we used to compute 'net returns' from 'gross returns':
- Commission percentage: it is a commission paid each time a trade is opened. This commission is not paid when the trade is closed.
- Bid-Ask spread percentage: it a cost given by the level of liquidity of that instrument, if the instrument has an high liquidity, bid-ask spread will be low. For example, an ETF on S&P 500 has a such lower Bid-Ask spread than a small-cap stock. The Bid-Ask spread is deducted from each trade performance.
- Overnight fee percentage (in annual terms):
- Spot account: If you operate using a spot account, set the overnight daily fee percentage to zero, because you don't have to pay nothing to keep the position open overnight.
- Explanation: it is a fee deducted each day that the position is kept open. We added this fee since many traders operate with leverage account using CFDs, that have this fee. For example, in Metatrader 4, you can find this fee, but expressed in intrument's points and not in percentage, in the 'contract specification', it's the voice 'Swap for long position' or 'Swap for short position'.
- Why are there different ovn_fees depending on the instrument: the overnight fee is different depending on the instrument you trade. Without entering too much into details and to give a simplistic hint to understand the point, the factor that impacts the most in the overnight fee is the currency in which the instrument is quoted. For example, if you buy S&P 500 which is expressed in USD you will have an annual overnight cost of about 3%/4%, because the annual US interest rates are about 3%. While, if you would buy an 'Argentina stock index', and Argentine peso interest rates are around 20%, you will have to pay an annual overnight cost of about 20%/30%. Our input paramenter is the 'annual ovn_fee percentage'. The formula to get the daily_ovn_fee_percentage from the annual one, is: Daily_ovn_fee_perc = (1 + annual_ovn_fee_perc) ^(1/365) - 1
- Stop Loss and Take Profit
- Optimize an anomaly, this section is useful to find the best stop loss and take profit for an anomaly. The stop loss and take profit are computed using gross returns. You can't save an anomaly from year, but after you have found the best combination of SL and TP, you can go to 'Customize Anomaly' page, inserting these SL and TP and then save the anomaly. In these page you can:
- Optimize SL or TP: you can optimize SL and TP one by one, choosing a maximum of 10 values of optimization. For example, you optimize SL, you choose SL_mode = 'in percentage' and as SL_value (start = 1%, step = 1%, stop = 10%), meaning that it will try 10 combinations of SL (1%, 2%, 3%, ...10%). To know more about 'SL and TP_mode and SL and TP_value', read the description of 'Customize anomaly'.
- Chose the optimization period: it is possible to choose the years of optimization, instead of the entire history of the instrument e.g. from 2012 to 2020.
- Lauch the optimization: by clicking a button to launch the computation, it may require a minute, especially if there are many years of history.
- See the results: when the computations are completed you can see the results by looking at two charts and one table:
- 1st chart: equity lines to see, one by one, if the optimized anomaly is better than the base anomaly (without SL and TP). You can switch the optimization value and see its equity line, e.g. from the equity line with SL 1%, to the equity line with SL 2%.
- 2nd chart: statistical metrics, you can choose one metric among a set of ones (Tot[R], Avg[R], Reward/Risk, Profit factor, etc.) to see which is the best optimized value of SL or TP. E.g., you find that the best TP is 5% because it has the highest average return and the nearest values (4% and 6%) are the second and third best TPs.
- Statistical table: each row of this table refers to an optimized value and its backtest metrics (Avg[R], RR, Pos%, PF, etc.). E.g., you can see that TP of 5% is a very good one because it is the best under most of the metrics (RR, pos%, Avg[R], PF) etc.
NB: We use daily historical data to backtest. We suggest you to choose not a too tight SL and/or TP (especially SL, also for 'stop hunting' phenomena), because if in the same day the instrument hit the SL and the TP (it should be rare), the SL will have the priority.
Portfolios
- Portfolios this page contains all the portfolios previoulsy created by you and other users of the web-site. It is possible to search and filter them, by then seeing some of their synthetic statistics. You can:
- Create Ptf, create a new portfolio by choosing its name
- Rename Ptf, rename a portfolio you previously created
- Delete Ptf, delete a portfolio you previously created
- Filter and sort Ptfs, choose the set of filters and sort the portfolios in the page, by one of their key metric (avg 1y return, reward/risk, Sharpe ratio, equity line stability, max drawdown etc)
- Save the template, save the template of filters. to load it the next time.
- Go to 'Portfolio details', by clicking in a portfolio, you'll be directed to the 'Portfolio details' page, in which you can change its components (if the portfolio is yours) and lanuch the backtest computations (equity lines and statistics, with respect to benchmark).
- Go to 'Compare Portfolios': in this page it is possible to compare the performance and the backtest metrics of two or more portfolios, including the benchmark.
- Go to 'Portfolio Trading Calendar': in this page you can create the trading calendar of one of your portfolio, pair your telegram account to FC bot, in order to receive notifications when your portfolio will open and close a position.
- Portfolio details: this page contains the components and the backtest of one of your portfolios.
- Change the components:: If the portfolio is yours you can change the components (a component is an anomaly you added to it), by removing them or changing their 'weight'. For example, if a weight is set to 1, it means that the portfolio will open the position with the entire capital; so, if the performance of the instrument during the trading timespan is 5%, the portfolio will record performance of 5%.
- Save portfolio and components: if the portfolio is the one of another user, with a click and by choosing a new portfolio name, you can add the portfolio to 'My Portfolios' and all the anomalies that compose it to 'My Anomalies'.
- Compute portfolio results: launch the computations of the ptf backtest, updating data and creating the equity line chart and the table with statistics.
- Compare Portfolios: in this page it is possible to compare the performance and the backtest metrics of two or more portfolios, including the benchmark. You can:
- choose the portfolios you want to compare, by choosing them from the yours and the ones of other users.
- Insert the starting and ending date of the comparison (e.g, from 2005 to 2018)
- Click the button to launch the computations to create the comparison.
- Portfolio Trading Calendar: in this page you can:
- create the trading calendar of one of your portfolio
- pair your telegram account to FC bot, in order to receive notifications when your portfolio will open and close a position. One user can pair one telegram account.
- activate and disactivate the notifications
- delete the pairing between your telegram account and FC bot
- delete the trading calendar of your portfolio.