Changes

Jump to navigation Jump to search

Portfolio Trader

2,959 bytes added, 13:58, 25 September 2014
no edit summary
To see '''Portfolio Script Calculation Diagram''' please click '''[[Portfolio Script Calculation Diagram|here]]'''
== Script Calculation and Raw Order Generation ==
Here is a sequence of actions that will be performed during calculation: # Before a portfolio is calculated, data from all instruments contained in the Instrument List are either gathered from MultiCharts database or downloaded from a data provider's server. The first instrument’s data range start date determines the start date for all instruments. The strategy is then applied to every instrument in the Portfolio Tree.# 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 Portfolio Trader Strategy Examples Backtester. 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 regular MultiCharts the last symbol (Symbol N) is evaluated.# After all of the strategies have been calculated, the PMM (Portfolio Money Management) signal is initiated (PowerLanguageif any has been applied under Portfolio Properties) . The PMM signal is used to apply money management settings to the entire portfolio. It can be downloaded [httpsaccess all of the portfolio's strategies via pmms_keywords. (Calculation-wise, the PMM signal is not copied to every signal and is always calculated on the first instrument on the same bar on which all other signals are calculated).# The PMM signal evaluates all of the portfolio’s strategies and affects generated orders (e.g., places orders which force positions to close, prevents opening positions or modifies the number of contracts). Raw orders that pass the PMM signal evaluation are then evaluated by the MONEY & RISK management system, with priority determined by MONEY & RISK's settings (priority is set by the PortfolioEntriesPriority keyword). If priority is set the same for all strategies, higher priority is given to the strategy located on top of the Portfolio Tree. <br><div style="background-color://dl#E3FBE5;"> '''Note''' that the PMM signal and the '''PortfolioEntriesPriority''' keyword are both applied to the portfolio. '''PortfolioEntriesPriority''' keyword is a legacy and it can interfere with the PMM signal.dropboxusercontentWe do not recommend you use it.com/u/95112551</div># The number of contracts is corrected in accordance with Money Management and margin (in '''Portfolio%20RT%20Manual.%20Examples.pdf here]Settings''').# The order is sent either to a broker simulator (in Backtesting), a demo broker account or a live broker account (in Automated trading).
== Understanding Portfolio Money Management Signals ==
Thus, if the rate had changed significantly after buying, for example up to 1.4, the executed trade would have been losing money:
The buy would have been for ($100/1.25 =) 80 EUR and the following amount would have been made after selling ($110/1.4 =) 78.57 EUR.
 
== Portfolio Trader Strategy Examples ==
 
'''Portfolio Trader Strategy Examples for regular MultiCharts (PowerLanguage) can be downloaded [https://dl.dropboxusercontent.com/u/95112551/Portfolio%20RT%20Manual.%20Examples.pdf here]'''
PMM Keywords
[[Category:Portfolio Backtester]]

Navigation menu