Changes

Jump to navigation Jump to search

Understanding Portfolio Backtesting

50 bytes removed, 16:47, 27 April 2017
no edit summary
== Understanding Dynamic Portfolio ==
A dynamic portfolio strategy is more then than simply a collection of separate strategies, and must take in to into account a number of additional factors:
* Capital limits
Batch Portfolio Backtesting, also known as Basket Backtesting, evaluates each strategy separately and then compiles the results.
True Dynamic Portfolio Backtesting simulates the actions of a real trader by taking in to into account the overall portfolio considerations dynamically, during the evaluation of each bar.
Portfolio equity and the available capital are dynamically evaluated for every instrument, on every bar, in order to determine the amount available to be invested.
When available capital is insufficient to enter all of the trading opportunities that arise simultaneously, the best opportunities are selected according to user-customizable criteria.
In addition to the performance of a particular instrument, portfolio drawdown or other portfolio performance aspects can be taken in to into consideration when making entry and exit decisions.
<br>
== Portfolio Backtesting Diagram ==
http[[File://www.multicharts.com/img/wiki/portfolio/portfolio_workflow.gif]]
<br>
 
== Script Calculation and Raw Order Generation ==
During backtesting, a single bar of each symbol's data series is evaluated by the strategy's signal scripts, starting with the first (oldest) bar. The series’ bars are evaluated in the order that the symbols appear in the symbols table of the Portfolio BacktesterTrader. Based on evaluation of each series’ bar, a set of one or more orders may be generated by the scripts for each of the symbols. Order sets are generated in the same sequence as the series’ bars are evaluated.
This process is illustrated in the Raw Order Generation section of the diagram: the first bar for symbol 1 is evaluated first, and a set of orders is generated based on that bar. Then the first bar for symbol 2 is evaluated, and a set of orders is generated based on that bar. The process is repeated until the first bar for the last symbol (Symbol N) is evaluated.
This process is illustrated in the Symbol Prioritization section of the diagram: the resulting sequence of order sets begins with the order set for the symbol 1, followed by the order set for symbol N, and ends with the order set for symbol 2.
The position of a set of orders in the sequence determines its relative priority: the set of orders for symbol 1 has the highest priority (3), set of orders for symbol N has the second highest priority (2), and the set of orders for symbol 2 has the least priority (31).
<br>
== Risk Control ==
At the risk control stage, the sequence of order sets is treated as one long sequence of orders. The orders are executed one-by-one from the beginning of the sequence, until all orders are executed, or until the risk control limits defined in Portfolio Settings of the Portfolio Backtester Trader prevent the execution of remaining orders. Any remaining orders that could not be executed are discarded.
This process is illustrated in the Risk Control section of the diagram: all of the orders for symbol 1 and symbol N are executed, while only some of the orders for symbol 2, 100 shares Long @ 55, are executed, due to risk control limits preventing the execution of the rest of the orders for symbol 2.
<br>
 [[Category:Portfolio BacktestingTrading]]

Navigation menu