Understanding Portfiolo and trade management of single and multiple strategies

Discussion in 'Risk Management' started by Murray Ruggiero, Nov 20, 2010.

  1. Murray Ruggiero

    Murray Ruggiero Sponsor

    Free free to ask more questions. I will be happy to help
     
    #31     Apr 7, 2011
  2. Gyles

    Gyles

    Please may I ask “How can I rebalance a portfolio so that no single trade represents too high a percentage of the account?” Thanks :)
     
    #32     Apr 26, 2011
  3. Murray Ruggiero

    Murray Ruggiero Sponsor

    Here is a tradeplan which shows how to have a system rebalance. The system does not required to be designed special for use of this tradeplan.

    ' TradersStudio(r) (c) 2006-2007 all rights reserved
    Sub DynMarginPlanSimpleWithRebalance(Percent,Ceiling,RangeLB,DMarginMult,SDate)
    Dim M As Integer
    Dim S As Integer
    Dim DollarsPerMarket
    Dim StartAccount
    Dim DollarsPerTrade
    Dim DynMargin

    Dim Curdate

    TradePlan.Session(0).UnitSize = 1
    DollarsPerMarket=Tradeplan.SummEquity/TradePlan.MarketCount
    ' For each session Loop though the trading plans.
    For S=0 To TradePlan.SessionCount-1
    For M = 0 To TradePlan.Session(S).MarketCount - 1
    Curdate=TradePlan.Session(S).Market(M).Data(0,"Date",0)
    DynMargin=DynamicMargin(TradePlan.Session(S).Market(M),RangeLB,DMarginMult)
    If DollarsPerMarket>DynMargin And Curdate>=MigrateDate(SDate) Then
    TradePlan.Session(S).Market(M).SyncSystem2(MigrateDate(SDate))
    If (DollarsPerMarket*Percent/100)/ DynMargin>=1 Then
    TradePlan.Session(S).Market(M).EntryNumUnits =Min(Floor((DollarsPerMarket*Percent/100)/ DynMargin),Ceiling)
    Else
    If (DollarsPerMarket*Percent/100)/ DynMargin>.7 Then TradePlan.Session(S).Market(M).EntryNumUnits=1
    End If
    Else
    TradePlan.Session(S).Market(M).EntryNumUnits=0
    End If
    If TradePlan.Session(S).Market(M).OpenPositonProfit>.20*Tradeplan.SummEquity Then
    If TradePlan.Session(S).Market(M).MarketPositionPlus("")=1 Then
    TradePlan.Session(S).Market(M).TSExitlong("Rebalance","",0,ceil(TradePlan.Session(S).Market(M).NumContractsHeld/2),Market,Day)
    Else
    TradePlan.Session(S).Market(M).TSExitShort("Rebalance","",0,ceil(TradePlan.Session(S).Market(M).NumContractsHeld/2),Market,Day)

    End If
    End If
    TradePlan.Session(S).Market(M).ExitNumUnits=TradePlan.Session(S).Market(M).NumContractsHeld
    Next
    Next
    End Sub
     
    #33     Apr 28, 2011
  4. Gyles

    Gyles

    Sincere thanks for the reply, Murray. :)
     
    #34     May 1, 2011