Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. cyan.gloom
    3. Best
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 23
    • Best 1
    • Groups 0
    • Blog

    Best posts made by cyan.gloom

    • How to load data to work with Multi-backtesting_ml

      Hello !
      I'd like to know how to load 2 kind of data such as 'stocks' and 'index' in order to work with Multi-backtesting_ml.

      def load_data(period):
          stocks = qndata.stocks.load_ndx_data(tail=period)
          index = qndata.index.load_data(tail=period)
          
          return stocks, index
      
      weights = qnbt.backtest_ml(
          load_data                     = load_data,
          train                         = train_model,
          predict                       = predict_weights,
          train_period                  =  15 *365,  # the data length for training in calendar days
          retrain_interval              = 1 *365,  # how often we have to retrain models (calendar days)
          retrain_interval_after_submit = 1,        # how often retrain models after submission during evaluation (calendar days)
          predict_each_day              = False,    # Is it necessary to call prediction for every day during backtesting?
                                                    # Set it to True if you suspect that get_features is looking forward.
          competition_type              = "stocks_nasdaq100",  # competition type
          lookback_period               = 365,                 # how many calendar days are needed by the predict function to generate the output
          start_date                    = "2006-01-01",        # backtest start date
          analyze                       = True,
          build_plots                   = True  # do you need the chart?
      )
      

      What should I do ?

      Best regards,

      posted in Strategy help
      C
      cyan.gloom
    • Documentation
    • About
    • Career
    • My account
    • Privacy policy
    • Terms and Conditions
    • Cookies policy
    Home
    Copyright © 2014 - 2021 Quantiacs LLC.
    Powered by NodeBB | Contributors