We will be posting results based on SignalSolver sentiment and the purpose of this post is to explain how those results are arrived at.
All SignalSolver backtests end up at the current time in either a buy (bullish) state or a sell (bearish) state. To aggregate the sentiment we simply calculate the percentage of bullish algorithms in a given sample of backtest algorithms. For example, if 7 algorithms end up in the buy state and 3 in the sell state, the sentiment would be 70% bullish.
To trade using sentiment, we must decide what kinds of sentiment behavior constitute a buy or sell signal. We can come up with all kinds of schemes for this, but in our simulations we restrict it to simple threshold crossing. In the program you can define the buy and sell thresholds separately but for most of the simulations we post, we will favor a dual 50% threshold; crossing above 50% being a buy signal, crossing below 50% being a sell signal. Occasionally we will show examples of simulations with a biased (non 50%) threshold. Occasionally we allow the program to optimize the thresholds periodically, and use those threshold values to trade off. Unusually, we will use inverted thresholds in which the buy will occur as the sentiment crosses below the threshold, and the sell above.
Simulated trading using sentiment
Since we use Open High Low Close data and current price, we are limited in the type of trading we can simulate. We can either
- Take a sentiment reading after the close and trade at the next open
- Take a sentiment reading just before the close and trade at the close
The first type of simulation will be more accurate than the second, but if trading live you may have been able to fill orders at better or worse prices than the simulation indicates. Note that in type 1. simulations, the trading prices are always “out-of-sample”, that is, the trading data points are not part of the backtest data. In type 2. simulations, the last price in the backtests is assumed to be the trading price, but in reality the trading price will often be better or worse, but if you assume these errors are small and cancel each other out, the simulations will end up being fairly accurate.
The simulations calculate the sentiment for one day/week/month at a time and then walk forward to the next day/week/month. Each time, the backtested algorithms are sorted by performance onto the Algorithms tab and the sentiment derived from the top N. N can be any value from 1 upwards and is defined by the “No. algs” setting. The included algorithms can change from day to day. Additionally, on any step the algorithms can be discarded and a new set found (seeking) or the algorithms can be re-optimized with new parameters (scanning) . When not seeking or scanning, the program just runs the algorithms with the same parameters as the previous day and re-sorts them according to performance. You can read the “Scck every” and “Scan every” settings to understand the frequency of these events.
As the simulation proceeds, one new OHLC data point is included and one old data point is excluded from the backtests.
You can read more about sentiment here