Using Portfolio Objects
The Portfolio Object is a new EasyLanguage component that allows strategies and functions to be written that access portfolio state values when they are executed from a Portfolio Maestro Strategy Group. The Portfolio Object is only for use with Portfolio Maestro and cannot be used on TradeStation charts.
To get acquainted with the features and capabilities of the Portfolio Object we have supplied some sample strategies. For example, you could use the following three steps to create a portfolio of equities that rebalances itself on a regular basis:
Step 1: Import the Portfolio Object Samples
- Access the TradeStation Development Environment from TradeStation desktop, click the EasyLanguage icon from the TradingApps window. You can also use the View > Development Environment menu sequence.
- Click the Toolbox tab (on the left) to open the Toolbox panel. Right-click the Hosts heading and select Choose Items... from the menu.
- From the Choose Toolbox Items window, make sure that PortfolioHost is checked, then click OK.
- Click the following link ( Portfolio_Object_Sample.ELD ). From the File Download dialog, select Open and then use the Import Wizard to install the sample Strategies and Functions into your copy of TradeStation.
The Portfolio Object Samples contain the following sample strategies: Bollinger Bands Limited Long Entry, Bollinger Bands Limited Short Entry, MACD LE Fixed Fractional, MACD SE Fixed Fractional, Portfolio Object Debug Log, Portfolio Maestro Rebalancer, and Portfolio Maestro Allocate and Rebalancer.
Step 2: Create a Portfolio Maestro Strategy Group using the Rebalancer
- Access Portfolio Maestro by clicking the Portfolio Maestro icon in the TradingApps window of the TradeStation desktop.
- Under Portfolios, choose Manage Strategy Groups.
- Create a new Strategy Group named Stock Rebalancer Using Equites (see Creating A Strategy Group ).
- From the Strategies tab: Click the Add Strategy button. place a check mark next to Portfolio Maestro Rebalancer strategy, and click OK.
- From the Symbol Lists tab: Click the Add Symbol List button and select a list containing several stocks.
- From the Ranking tab:
- Select a ranking strategy from the Method drop-down list (for example, Percent Change (%)).
- Set the Filter Method to Select Ranked Symbols by Percentile.
- Set the Filter Limit to 0 (all stocks).
- Select a Ranking Interval of Weekly and a Calculation Interval of Daily to rank the stocks weekly using daily price bars.
Step 3: Create a Portfolio Maestro Portfolio using the Rebalancer
- Under Portfolios, choose Manage Portfolios:
- Click New to create a new portfolio named Stock Rebalancer.
- Click Add Strategy Group and select the Stock Rebalancer Using Equities strategy group.
- Review the properties and values for the backtest. On the Strategy Inputs tab, note that the RankCutoffparameter of the Portfolio Maestro Rebalancer strategy named will control how many positions for the top ranked stocks will be held. The default value is 3.
- Click Perform Backtest to start backtesting.
- Under Portfolios, choose Reports:
- Select Performance Report and click the Trades List tab. When you view the performance report you can see the trades and performance of the backtest when a position is held for each of the top ranked stocks.
- Select Trace Log and click the Ranked Instruments tab. This shows you how the stocks were ranked in each ranking period.