"Assembly line" of pair trade ratios

Discussion in 'Strategy Building' started by marko1046, May 28, 2015.

  1. marko1046

    marko1046

    Does anyone have any experience in creating a loop on Google Sheets?
     
    #11     May 29, 2015
  2. i960

    i960

    If you just want to chart a spread of relative strength stop using a difference function and just chart the division.

    aal_luv.png
     
    Last edited: May 29, 2015
    #12     May 29, 2015

  3. JavaScript ...... Below is a code snippet that should get you started. Tools > Script Editor Enter the following JavaScript code and Save.

    Code:
    function stocks() {
    var stocks = ["AAPL", "GOOGL", "PCLN", "QQQ","MSFT","AMZN"];
       for (i in stocks); {
         return stocks
    }
    }
    
    function fun_with_math(C1) {
      var results = C1 * 23
       return results
    }
    


    • In cell A1 enter: =stocks()
    • In cell B1 enter: =fun_with_math(C1)
    • In cell C1 enter any number.


    :)
     
    #13     May 30, 2015
  4. dealmaker

    dealmaker


    PairCo has all the pair combinations but I think they'll want to charge you for it...


    ps I am not affiliated with them
     
    #14     May 30, 2015