Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. spancham
    3. Best
    S
    • Profile
    • Following 0
    • Followers 1
    • Topics 7
    • Posts 39
    • Best 9
    • Groups 0
    • Blog

    Best posts made by spancham

    • Strategy Funding

      Hi guys,
      I have a question about strategy funding.
      I read somewhere that if you give out a $1M of funding, let's say the strategy developer wins a contest, then the strat dev will earn a percentage (e.g. 10%) of the quarterly earnings if the strat makes a profit for that quarter and so on. And if the strat loses for the quarter then the dev does not make any money but does not lose any money either.
      My question is this:
      If you guys are able to get investors for the dev's strat, let's say $10M hypothetically, will the dev get to share in the greater amount of earnings percentage wise from the $10M, or will the dev only get a percentage of earnings from the $1M? 📈
      That was long winded but I hope you understand my question.
      Thanks.

      posted in General Discussion
      S
      spancham
    • RE: Strategy Funding

      @support
      Thank you. That is the level of detail I was looking for.
      I presume you meant though the quant would receive a fixed management fee of $10K per month for $1M of funding on a 1.0 Sharpe Ratio strategy?

      posted in General Discussion
      S
      spancham
    • RE: Strategy Funding

      @support
      Thank you for responding.

      1. Can you give me an idea pls what is the monthly $ amount a quant can make from the fixed fee? Just a ballpark range.
      2. What is a 'long track record'? How much time would the strategy have to be running?
      posted in General Discussion
      S
      spancham
    • RE: Strategy Funding

      @support
      What if I or my family members wanted to invest in my own strategy?
      Where can I find information on Quantiacs 'live' hedge fund services please?
      Is that a different company? I cannot find a tab for investors on the site?
      Thanks.

      posted in General Discussion
      S
      spancham
    • Please advise on p settings. Thanks.

      Hello, first of all, thanks for your great platform. Beats having to build my own backtester so I am trying to learn it.
      I am attempting a simple pairs trading strategy for the WTI vs Brent Crude spread, code below.
      For some reason, it does not stop running & also does not plot the Equity chart. I don't believe I am understanding correctly how to set the position exposure.

      And the following warning is given:
      C:\Users\sheikh\anaconda3\lib\site-packages\quantiacsToolbox\quantiacsToolbox.py:881: RuntimeWarning: invalid value encountered in true_divide
      position = position / np.sum(abs(position))

      import numpy as np
      import pandas as pd
        
      def  mySettings():
          settings = {}
          settings['markets'] = ['F_CL', 'F_BC']
          settings['beginInSample'] = '20171115'
          settings['endInSample'] = '20210201'
          settings['lookback'] = 84
          settings['budget'] = 10**6
          settings['slippage'] = 0.05
          settings['zthreshold'] = 1.75
          settings['p'] = np.array([0., 0.])
          settings['count'] = 0
          return settings
      
      def myTradingSystem(DATE, CLOSE, exposure, equity, settings):
          s1 = pd.Series(CLOSE[-settings['lookback']:,0])
          s2 = pd.Series(CLOSE[-settings['lookback']:,1])
      
          # Compute mean of the spread up to now
          mvavg = np.mean(np.log(s1/s2))
      
          # Compute stdev of the spread up to now
          stdev = np.std(np.log(s1/s2))
      
          # Compute spread
          current_spread = np.log(CLOSE[-1,0] / CLOSE[-1,1])
      
          # Compute z-score
          zscore = (current_spread - mvavg) / stdev if stdev > 0 else 0
          
          p = settings['p']
      
          if zscore >= settings['zthreshold']:
              p = np.array([-0.5,0.5])
              settings['p'] = p
          elif zscore <= -settings['zthreshold']:
              p = np.array([0.5,-0.5])
              settings['p'] = p
          else:
              p = settings['p']
              
          settings['count'] += 1
          if settings['count'] % 50 == 0:
              print(settings['count'], equity, exposure)
          
          return p, settings
      
      
      posted in Strategy help
      S
      spancham
    • RE: Please advise on p settings. Thanks.

      Hi again @support
      I read through everything and all the examples but to be honest the new format is not straightforward to me. I was wondering if there are Quantiacs developers available that you can recommend or put me in contact with to help convert my pairs strategy from the legacy toolbox format to the new format. I do not mind paying for their services.

      Once I see how it's done using my strategy, I think I can understand how to set up my other strategies from there on.
      Thanks for your help.
      Sheikh

      posted in Strategy help
      S
      spancham
    • Optimizer still running

      Hi @ support (Stefano)
      Thank you for your message. No, I was not able to resolve the issue. If you figured out a solution, kindly post it here. If you want me to post my code again, let me know pls.
      I decided to go back and try to get the original Quantiacs example itself to run but alas that too has been running for several hours 6+ now. Screenshot below. I tried using 20 workers, I don't know what's reasonable but my PC is pretty powerful. It's still running. 🏇 🏇
      This is your example found in your documentation, no change. As you can see the first part ran & printed out ok.

      tryopt.PNG

      posted in Strategy help
      S
      spancham
    • RE: Machine Learning Strategy

      @support
      ok guys, I tried what you suggested and I am running into all sorts of problems.
      I want to pass several features altogether in one dataframe.
      Are you guys thinking that I want to 'test' one feature at a time and that is why you are suggesting working with more than one dataframe?
      Here is an example of some code I tried, but I would still have to merge the dataframes in order to pass the feature set to the classifier:

      def get_features(data):
              # let's come up with features for machine learning
              # take the logarithm of closing prices
              def remove_trend(prices_pandas_):
                  prices_pandas = prices_pandas_.copy(True)
                  assets = prices_pandas.columns
                  print(assets)
                  for asset in assets:
                      print(prices_pandas[asset])
                      prices_pandas[asset] = np.log(prices_pandas[asset])
                  return prices_pandas
              
              # Feature 1
              price = data.sel(field="close").ffill('time').bfill('time').fillna(0) # fill NaN
              price_df = price.to_dataframe()
              
              # Feature 2
              vol = data.sel(field="vol").ffill('time').bfill('time').fillna(0) # fill NaN
              vol_df = vol.to_dataframe()
              
              # Merge dataframes
              for_result = pd.merge(price_df, vol_df, on='time')
              for_result = for_result.drop(['field_x', 'field_y'], axis=1)
                  
              features_no_trend_df = remove_trend(for_result)
              return features_no_trend_df
      

      Can you help with some code as to what you are suggesting?
      Thanks

      posted in Strategy help
      S
      spancham
    • RE: Share the state between iterations

      Hi @support
      Thanks but I tried that and it still did not work.
      Just so you understand, I do NOT work locally, I only work in the Quantiacs online cloud Jupyter env.
      I ran the update you suggested in my Quantiacs online Jupyter and it still did not work. I'm guessing you guys keep the env updated though.
      I'm still getting the same error:
      TypeError: backtest() got an unexpected keyword argument 'collect_all_states'

      Any suggestions pls?

      posted in Request New Features
      S
      spancham
    • Documentation
    • About
    • Career
    • My account
    • Privacy policy
    • Terms and Conditions
    • Cookies policy
    Home
    Copyright © 2014 - 2021 Quantiacs LLC.
    Powered by NodeBB | Contributors