Customize Anomaly page

Customize Anomaly page

Anomalies Pages Jun 30, 2023

Starting from an Anomaly is possible to create a variation by changing one or more parameters among:

  • Stop-Loss (SL)
  • Take-Profit (TP)
  • Trading-Costs:
    • Commission %
    • Bid-Ask Spread %
    • Overnight-Fee %

Why a Customized Anomaly is important

If you want to build a Portfolio of Anomalies, is important to know that the Portfolio considers just the Net-returns. So, if you trade an instrument with a Broker that offers trading-costs different from the default ones, and you want to simulate more precisely the results of the backtest, you should create a Customized Anomaly with such trading-costs.

How to create a Customized Anomaly

To create a Customized Anomaly:

  • Set input the parameters (SL, TP, Trading Costs)
  • See the backtest, and decide whether to Save the 'Customized Anomaly' as a new anomaly. If you save it:
    • it will appear in My Anomalies page.
    • other users will be able to see it from All Anomalies => Advanced Filters => Filters on User Action => Customization of Anomalies => 'Both' or 'Customized'

Stop Loss and Take Profit

Suggestion on Stop Loss

We suggest to choose wide enough Stop-Loss for 2 reasons:

  • the platform use daily historical data to backtest, and if in the same day the instrument hit both SL and TP, the SL will have the priority and the trade will result in a loss;
  • the stop hunting phenomena that happens in real markets. The fluctuating markets cause tight stop losses to be hit very often.

Mode and Value - examples

For both Stop-Loss and Take-Profit there is a Mode and a Value:

  • Mode: (SL_mode, TP_mode) you can chose among different types described below.
  • Value: (SL_mode, TP_mode) is the value of the SL or TP, computed according to its mode. For each mode, you find examples below.

Below, the list of the different 'Mode'. The examples are made on Stop-Loss computation in a long-trade, if the entry price is 100$.

  • No Stop Loss
  • In percentage
    • if SL_value = 1% => SL 99$.
    • if SL_value = 5% => SL 95$.
  • In price distance
    • if SL_value = 1 => SL 99$.
    • if SL_value = 5 => SL 95$.
  • In average daily range multiple
    assuming the 'average daily range' of that instrument in the last 50 days has been 1$
    • if SL_value = 1 => SL 99$
    • if SL_value = 5 => SL 95$

Trading Costs

The Trading Costs are deducted from each trade return.

In ForecastCycles there are tradable (such as Stocks, ETFs) and not-tradable tickers (such as pure Stock-Indices). And it is possible to apply trading-costs to both:

  • Tradable tickers: we collected average trading costs from different brokers
  • Not-Tradable tickers: trading costs applied will be equal to the ones of similar tradable-instruments.

Since your Broker could offer different trading costs, you can change the default costs and see the results of the backtest.

Commission %

It is paid one time for each trade when the trade is opened.

Its amount depends from the Broker policy.

Bid-Ask spread %

It is paid one time for each trade when the trade is opened.

In some Brokers the Bid-Ask spread may be fixed, but generally it is proportional to the level of liquidity of an instrument:

  • If the instrument has high liquidity (e.g. ETF on S&P 500), Bid-Ask spread will be low.
  • If the instrument has low liquidity (e.g. Small-cap Stock), Bid-Ask spread will be high.

Overnight fee %

It is an interest that is paid each day that trade is kept open overnight, due to the Broker that is lending money. Generally is a negative (a cost), but in some cases can be positive.

It is entered as an annual percentage and then automatically adjusted as a daily percentage. The formula for the adjustment is:
'Daily ovn fee %' = (1 + 'annual ovn fee %') ^(1/365) - 1

A trader can use a Spot account or a Leveraged acccount:

  • 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.
  • Leveraged account
    Often retail traders operate in markets through brokers that offers leveraged CFDs to operate. Most of them has an overnight-interest that is deducted each day that the position is kept open, since broker is borrowing money to the trader.
    This interest may be positive. In Metatrader 4, you can find this fee, but expressed in intrument's points and not in percentage, in the 'contract specification', with the name:
    • 'Swap for long position' ==> if you trade Long
    • 'Swap for short position' ==> if you trade Short

The factor that impacts the most the amount of the overnight interest is the currency in which the instrument is quoted, and the associated interest rates.

For example, when I'm writing:

  • if you buy 'US S&P 500', which is quoted in USD, you will have an annual overnight cost of about 3%, because the annual US interest rates are around 3%.
  • if you buy 'Argentina Stock Index', which is quoted in ARS (Argentine peso), you will have an annual overnight cost of about 40%, because the annual Argentina interest rates are around 40%.
Customize Anomaly page

Video on YouTube

Customize Anomaly page presentation and tutorial is available on YouTube

  • Link to the Video in English
  • Link to the Video in Italian

Tags

Andrea Ferrari

I deal with Programming and Finance, I lead the R&D of ForecastCycles. I strongly believe that Seasonality, COT and Macro and Fundamental analysis are the basis for Trading and Investments.