Backtesting in financial services, is the process of testing the predictive ability of an A.I. algorithm tuned to a given trading strategy, by replaying historical price information (note: corporate fundamentals and financial news will be added soon) and simulating trades in order to evaluate the algorithm recommendations and validate the performance of the strategy. The simulation of the trading of a strategy can be over a defined period whereby results are analyzed and assessed against desired levels of return and risk (typically benchmarks).
Neotic offers users the ability to define the parameters of a trading strategy according to a personalized risk-return profile, backtest its performance, and save the optimal parameters for daily use in forecasts. “Neotic backtested strategies” showcases previously tested strategies with a return beating the market.
Strategy title: Users can customize strategy titles in order to differentiate from one another. Typically, titles are chosen to reflect a unique criterion related to a backtest.
A Long strategy implies buying stocks with the expectation that they will rise in value; thus selling them in the future at a higher price and making profit. This strategy has limited downside (losing the amount paid for the stock), and no cap on the upside potential.
A Short strategy is selling borrowed stocks today in the open market with the expectation that they will decrease in value, thus buying them back in the future at a lower price and returning them to broker the from which they were borrowed, and making a profit from the difference. This strategy has limited upside, but infinite downside and risk potential.
A Long & Short strategy takes Long positions in stocks that are expected to increase in value and Short positions in stocks that are expected to decrease in value. In theory, the goal of this strategy is to enhance risk-returns and achieve market neutral returns by profiting from a change in the difference, or spread, between two stocks. Thus, the user might use it for hedging their position, reduce exposure volatility and market risk as a whole.
The backtesting period is the duration of the sample time during which the backtest is performed. Neotic’s minimum backtesting period is 3 months (for statistical relevance) up to one year. A longer backtesting period can be achieved by aggregating the results of several years together. To set the period, users should define:
Starting date: 6 months ago, up to 01/01/2009 (current limit of available data source)
Ending date: 3 months ago, up to 3 months after the selected starting date.
Cash at the beginning of backtesting: The amount of money the user is planning to invest. It cannot be less than the initial price.
Trading fees: The amount of money charged by the broker for each full transaction (buy + sell or short sell + buy to cover). So actually, this amount is double the trading fee paid usually. It depends on the broker the user is dealing with or is planning to deal with.
% of daily investment: The percentage of available cash to invest in every day. Users can invest up to 100% of their available cash.
Minimum amount to keep in the portfolio: The amount of cash the user wishes to keep at hand - expressed as a percentage of the initial cash - cash at the beginning of backtesting. Cash in the portfolio cannot exceed 100% since no leverage is allowed. Investment will stop if cash remaining in the portfolio is equal to or less than this amount.
Stop loss (%): The percentage of loss (out of the initial price), per stock, that is considered as a boundary or that can be tolerated by the user. Minimum allowed stop-loss is -1%. Note that stop-losses on Neotic are conventionally negative figures as they involve losses. Please make sure there is compatibility and no confusion of convention between your broker and Neotic. In order to limit loss, positions will be closed once holdings decrease/increase to a certain amount (% of the initial price of the stock). The user must be careful however of the risk involving a sudden rise in price after opening a shorting position- it can involve an infinite loss.
Target gain (%): The minimum percent return on investment (out of the initial price of the stock) the user desires to gain. It cannot be less than 1%. In order to ensure the user’s returns, positions will be closed once holdings increase/decrease above/below a certain amount (% of the initial price of the stock). The percentage gain cannot exceed 100% when shorting.
Holding period: Maximum number of days (N) the user is planning to keep the stock before closing the position. This number must be an integer. Note that if the stop-loss or target-gain orders are triggered prior to the holding-period expiration, the position will be closed at the stop-loss or target-gain price, otherwise a closing order will be triggered from Neotic to sell/cover the stock at the close-price on the Nth day after buying/short selling.
Price: The cost of purchased/shorted stock. By defining the price, the user is defining what kind of stocks they wish to buy, penny stocks (0.1 to 6 USD), no penny stocks (minimum 6 USD) or higher price stocks (over 100 USD).
Market: The user can limit his strategies to stocks from specific markets: NYSE, NASDAQ, NYSE MKT, NYSE ARCA. If indifferent, the user can check the three markets.
Minimum volume price: Volume is the number of stocks traded in an entire market during a given period. When stocks are more actively traded, their trade volume is high and vice versa. Volume price = (number of shares traded) x (price per share). The user can choose the minimum volume price, means the average daily amount invested in stock on a daily base. Higher volume-price means the stock is liquid, i.e. it can be easily exchanged when offered on the market
Diversification: Number of different companies daily traded. It is a risk management technique since a portfolio constructed of diversified companies will, on average, yield higher returns and carry lower risk than any individual stock found within the portfolio. It reduces or eliminates unsystematic risk or firm specific risk. Therefore, the higher the number of different companies, the lower the risk. Be careful! When the user has a small capital and a relatively high trading fees, they should not increase the diversification number because they will have high transaction cost.
Avoid stocks: The user can avoid buying/short selling stocks during specific periods (events) that may produce an unexpected change in price. The “after” number of days must be larger than or equal to the holding-period. Neotic recommends it to be bigger (twice as big, for example) than the holding period.
Splitting: A stock split increases the number of the corporation's outstanding shares by dividing each share (according to a certain ratio), which in turn diminishes its price (by the same ratio), in such a way that the total value of outstanding shares remains the same. In other words, a stock split will increase the volume but will not have an impact on the volume-price. According to his strategy, the user can avoid buying/short selling stocks before or after the company declares a stock split, by a period (number of days) of his choice.
Dividend: When a company issues dividend payout, its stock price can potentially be impacted. If the company declares a dividend payment that is higher or lower than expected, stock price tends to rise or drop accordingly. According to his strategy, the user can avoid buying/short selling stocks before or after the company distributes dividends (a portion of its earnings to its shareholders), by a period (number of days) of his choice.
Earning: When a company announces earnings or net income for each outstanding share, it can affect its stock price. If the company reports earnings that are significantly higher than projected, its stock price tends to rise. If the company reports earnings that are significantly below projections, its stock price tends to fall. According to his strategy, the user can avoid buying/short selling stocks before or after the company announces earnings, by a period (number of days) of his choice.
Sector: Neotic will only include stocks from the sectors of the user's choice. However, the user can mark all sectors if they have no preferences.
The portfolio’s performance page will contain the following information:
A graph will show the performance of the user’s portfolio (whether it is only Long, only short or Long & Short) compared to the performance of the market (S&P500). The S&P500 is adjusted to 100K in order to compare it clearly with the portfolio.
The user’s portfolio is summarized as well and will include the following rates:
S&P500: The Standard & Poor's 500 is an American stock market index based on the market capitalizations of 500 large companies. It is one of the most commonly followed equity indices. It is commonly used as a representative of the U.S. stock market. Therefore, this number represents the market return.
Portfolio return: The accumulated percentage of return of the user’s portfolio over the period they chose.
Jensen’s alpha (active return): Measures the user’s portfolio return relative to the market return (S&P500) taking into consideration the amount of risk involved. The higher the alpha, the more the portfolio has earned above the predicted level.
Beta: Weighted sum of the individual stocks betas. Measures the volatility, or systematic risk (market risk), of the portfolio in comparison to the market as a whole. A beta of 1.3 for example relative to the S&P 500 implies that the portfolio is 30% more volatile than the market. A zero-beta portfolio would have zero correlation with market movements, which means that the portfolio’s return is independent from that of the market.
Total number of trading days (position opening): The number days in which stocks were actually traded (excluding days in which Neotic did not find any stocks to trade).
Average amount invested daily: How much money, on average, is invested per day in dollar figure.
Number of traded stocks: Number of different stocks traded in the user’s portfolio.
Number of trades: Total number of trades executed during the backtesting period.
Performance: The user here checks the performance of their portfolio according to the following ratios.
Treynor ratio (reward to volatility ratio): This ratio calculates how much the user have excess return (compared to risk-free return) taking into account the market risk involved (beta). It is applicable only to well-diversified portfolios. A good portfolio has a Treynor ratio higher than that of the market.
Sharpe ratio (risk-adjusted return): This ratio calculates how much the user have excess return (compared to risk-free return) taking into account the total risk involved (standard deviation). It is applicable to all portfolios. A portfolio with a higher Sharpe ratio is considered superior relative to its peers. A Sharpe ratio lower that is lower than one indicates that return on investment is less than the risk taken. A Sharpe ratio of one indicates that the returns on investment are proportional to the risk taken. A Sharpe ratio of one or better is considered well; two or better is very good; and three or better is considered excellent.
Drawdown: The peak (highest price)-to-trough (end of period of declining price and the transition to increase) decline during the investment period. A drawdown is usually quoted as the percentage between the peak and the subsequent trough. Drawdowns help determine an investment's financial risk. A drawdown is the reduction of one’s capital after a series of losing trades.
Cumulative gains/losses (USD): Additions of all gains and losses from the starting date until the end of the backtest.
Best daily gain USD (%): The maximum amount of profit reached in a day, in dollar sign as well as percentage from initial investment.
Worst daily loss USD (%): The maximum amount and percentage of loss reached in a day, in dollar sign as well as percentage from initial investment.
Two tables will show the user’s portfolio return in USD as well as the percentage return, where the green color represents the bought stocks and the red color represent the shorted stocks. In other words, if the user have followed this strategy at the starting date of the backtest, our algorithms would have chosen for them every day the stocks showed in the table and they would have gained or lost the given return. The user can at any time review the parameters of their strategy, by pressing the button “trading criteria”, which will take them back to their backtest filled form.