Understanding the algos behind

Home Forums Logical Invest Forum Understanding the algos behind

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #35935

    Understanding the algos behind

    #36377
    reuptake
    Participant

    So to start the discussion. Am I correct about how this works? “Static Ranking (SR): All strategy components receive directly in one step the allocation which maximizes the the modified sharpe ratio of the overall portfolio for the rebalancing period.”

    So in case of 2 component strategy (AAA and BBB ETFs):

    1. Create a portfolio of 100% AAA / 0% BBB, compute modified Sharpe for lookback period
    2. Create a portfolio of 90% AAA / 10% BBB, compute modified Sharpe for lookback period
    .
    .
    .
    10. Create a portfolio of 0% AAA / 100% BBB, compute modified Sharpe for lookback period
    11. Select portfolio with the highest Sharpe

    (I skip other parameters like mean reversion period and so on).

    #36456

    Yes, for Static Ranking (SR) the algo permutes (runs through) all possible combinations of the constituents to find the best combination in terms of modified Sharpe.

    In difference, for Dynamic Ranking (DR), the algo would first permute all combinations of all non-bond ETF to find the best combination in terms of modified Sharpe, and then in a second step add the bond ETF in its best mix.

    #36475
    reuptake
    Participant

    So it’s not a very good idea to run this on, eg. 500 stocks? :)

    #36600

    No, beside the technical hurdles, I doubt you would get any suitable result running on such huge number of stocks. In our experience it´s better to stay at the index level for a market, or to use a limited number of index constituents (Dow, Nasdaq or sub indexes of the S&P500).

    #42591
    Tom Gnade
    Participant

    I actually managed to get it to run on the entire list of S&P 500 stocks several times before it became unstable. It takes a while. I’m not 100% sure the program is multi-threaded and using all 4 CPU cores, if it isn’t then that would help, along with using a 64-bit architecture, so larger chunks of data could be processed in memory.

    #42781

    Tom, as you commented over the phone, in the long run probably the way to go is probably a cloud-based QuantTrader, which would allow more computing power and alliviate some of the data issues. Let us discuss this further, very much appreciate your input.

    #50670
    brwg
    Participant

    I am new to QuantTrader.I am still not very sure about the logic for DR.

    For example, in your Nasdaq 100 Hedged strategy, DR is used and the potential component consists of TMF, UGLD and #Nasdaq100. TMF is the only symbol being classified as Treasury ETF. The others are ‘Common ETF”. The ranking is to pick the top 1 ETF.

    Does this mean:

    (1) at the time of ranking, UGLD and #Nasdaq will be compared first to find the top ETF among the two. After that, the system will add TMF and find the best asset allocation between TMF and the Top 1 ETF (between UGLD and #Nasdaq)?

    or

    (2) at the time of ranking, UGLD and TMF will get compared first. After that, the system will find out the optimal allocation between #nasdaq and the top of the two (UGLD and TMF)?

    It appears to me the system runs as per the above (2).

    How do we tell QuantTrader which ETF or sub strategy is to be added in the second step? I thought this is being controlled when we set up the Symbol: If the symbol is classify as “Treasury ETF”, it will only be added in the second step in the case of DR. However, in the case of the #Nasdaq100 strategy, only TMF is classified as “Treasury ETF” but it appears to me that the DR logic runs like the scenario 2 ,where TMF is compared in the first step, rather than scenario 1 where TMF is only added in the second step. Can you please explain?

    Similarly in the strategy of GMRS Hedge, DR is used to pick the top 2 ETFs. The ranking logic appears to select the top 2 of the six global market ETFs first and in the second step the #Hedge portion is added to form the portfolio. My question is, as #Hedge is classified as ‘Common ETF’, how does the system knows #hedge should be added in the step 2 rather than being compared in step 1?

    thanks

    thanks

    #50673
    reuptake
    Participant

    [quote quote=50670]I am new to QuantTrader.I am still not very sure about the logic for DR.

    [/quote]

    Thanks for asking this questions, those are exactly my questions too. I’ve added TQQQ and UDOW to 3x UIS strategy. I thought it will always use one of SPXL, TQQQ, UDOW and some hedge (UGLD or TMF). This is not the case. I think what the order of ETFs added may be significant.

    #50701
    Vangelis
    Keymaster

    Bryan,

    Your number (2) example is correct.

    A simpler example:
    SPY
    EFA
    EEM
    TLT

    The last stock/ETF in the list in the portfolio manager works as a ‘hedge’ if the DR Algo is chosen and will always be included. So when we pick DR and Top 1 ETF, the algo will pick the best ETF from SPY/EFA/EEM and then combine it with TLT. The result will be allocation to two ETFs always inclusive of the last ETF.
    In the Nasdaq 100 hedged, the last symbol is #Nasdaq. So the DR algo would rank TMF and UGLD and then combine the best with #Nasdaq, i.e., what you mentioned as choice (2).

    Alex just included a much needed table explaining the modified sharpe algos in this new post:
    https://logical-invest.com/video-tutorial-quanttrader-a-complete-walk-through-for-new-users/

    #50708
    brwg
    Participant

    great. thank you very much. this is very helpful. i will read through the materials.

    regards

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.