Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. CptanPanic
    3. Posts
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    C
    • Profile
    • Following 2
    • Followers 1
    • Topics 7
    • Posts 20
    • Best 5
    • Groups 0

    Posts made by CptanPanic

    • RE: Anyone use backtrader to do live trading on Bitcoin exchange?

      @Ed-Bartosh Nice job, looks great.

      posted in General Discussion
      C
      CptanPanic
    • Is it possible to do nested talib indicators?

      I would like to do something like the the LINEARREG of the output of another talib indicator. Is this possible directly, or do I need to just make my own indicator that combines them?

      Thanks.

      posted in Indicators/Strategies/Analyzers
      C
      CptanPanic
    • RE: Copyright Abuse?

      @Richard-O'Regan so you think this "no further messages will be answered and no pull-requests will be accepted" is a temporary thing, and @backtrader is still developing 2.0 in private?

      posted in General Discussion
      C
      CptanPanic
    • RE: Copyright Abuse?

      The no pull-requests thing is most troubling. That is the one of the best things about FOSS, is the community can contribute. Combined with the fact that he might be saying he isn't going to post messages in forum anymore, that is a project killer. Maybe we should start submitting pull requests to @Richard-O-Regan 's fork https://github.com/rich-oregan/backtrader

      posted in General Discussion
      C
      CptanPanic
    • RE: Optimization Exceptions on Windows 10 and Anaconda 3

      You are on to something. I currently had 3 analyzers, Calmar, Returns, and PyFolio. Multicore fails if I enable Calmar or Pyfolio. @backtrader Any ideas?

      posted in General Code/Help
      C
      CptanPanic
    • RE: Optimization Exceptions on Windows 10 and Anaconda 3

      I am currently debugging a similar error in Linux, my current work around is to set maxcpus=1 when creating Cerebro()

      posted in General Code/Help
      C
      CptanPanic
    • Once datas have been added with adddata(), is there a way to adjust time period that backtest operates on?

      I am working on my own version of a walk-forward optimization algorithm, and ideally I would just add all the backtest data with adddata(), and call run() with different todate, and fromdate. I don't see this as an parameter to run(), so what is the best way to do this, hacky or otherwise.

      Thanks.

      posted in General Discussion
      C
      CptanPanic
    • RE: Walk Forward Analysis Demonstration

      @Curtis-Miller nice job, any new work on this?

      posted in General Discussion
      C
      CptanPanic
    • RE: Anyone use backtrader to do live trading on Bitcoin exchange?

      @gindeleo yes lets do it.

      posted in General Discussion
      C
      CptanPanic
    • RE: Anyone use backtrader to do live trading on Bitcoin exchange?

      @ricpruss Actually that library ccxt looks great, it has support for tons of exchanges and is updated frequently. Would make sense to make a backtrader broker that just takes a ccxt object, and backtrader wouldn't have to worry about individual exchanges at all.

      posted in General Discussion
      C
      CptanPanic
    • RE: What is units for timeperiod?

      Yes I could have been clearer. I am referring to things such as indicators that have an option "period", and for backtrader I mean bars, some other libraries call these candles.

      posted in General Code/Help
      C
      CptanPanic
    • RE: Anyone use backtrader to do live trading on Bitcoin exchange?

      @Ed-Bartosh Yes GDAX support would be great. Let me know how it looks when you get to it.

      posted in General Discussion
      C
      CptanPanic
    • PyFolio analyzer multiple data sources not working.

      If i call get_pf_items, the positions does not show positions from all data sources. Looking at source, the suspect line is https://github.com/mementum/backtrader/blob/master/backtrader/analyzers/pyfolio.py#L130
      the v[-2:] is assuming there is only one data, and should be based on number of datas.

      posted in General Code/Help
      C
      CptanPanic
    • What is units for timeperiod?

      Are the units for timeperiod candles, or days? Seems like the former, but wanted to make sure.

      Thanks.

      posted in General Code/Help
      C
      CptanPanic
    • RE: Anyone use backtrader to do live trading on Bitcoin exchange?

      Sounds good, I am currently coding up my algorithim with backtest, but once I am happy would that, would be great to divide and conquer.

      posted in General Discussion
      C
      CptanPanic
    • RE: With a strategy with multiple instruments, anyway to make one plot per?

      Thanks,
      That does work. Alternatively is there a way to get access to this raw data so I can plot myself?

      posted in General Discussion
      C
      CptanPanic
    • RE: Tearsheets - QSTrader

      I'm just wondering what you mean by pyfolio tear-sheets are 'iffy'?

      posted in General Code/Help
      C
      CptanPanic
    • With a strategy with multiple instruments, anyway to make one plot per?

      I have multiple instruments with corresponding data feeds. The resultant plot() is way too busy, and would like to have a plot() for each instrument, even if that meant that the top portfolio section is the same between plots. Can this be done?

      Thanks.

      posted in General Discussion
      C
      CptanPanic
    • Why do I get 'None' as value for SharpeRatio?

      So I am new to backtrader, and have setup an initial strategy. I have a few analyzer added, and the other ones give a value, but the SharpeRatio one gives me 'None' Any ideas?

      cerebro = bt.Cerebro()
      
      cerebro.broker.setcash(1000.0)
      
      
      print('STart Portfolio Value: %.2f' % cerebro.broker.getvalue())
      
          # Add a strategy
      cerebro.addstrategy(TestStrategy)
          
      # Pass it to the backtrader datafeed and add it to the cerebro
      #data_feed = bt.feeds.PandasData(dataname=data['USDT_ETH'])
      
      # Create a Data Feed
      data_feed = bt.feeds.InfluxDB(
          dataname="USDT_ETH",
          username="admin",
          password="conStant",
          database="finance",
          host="192.168.1.82",
          open="open",
          close="close",
          high="high",
          low="low",
          # Do not pass values before this date
          fromdate=datetime.datetime(2017, 1, 1),
          # Do not pass values after this date
          todate=datetime.datetime(2017, 12, 31))
      
      cerebro.adddata(data_feed)
      
      data_feed = bt.feeds.InfluxDB(
          dataname="USDT_BTC",
          username="admin",
          password="conStant",
          database="finance",
          host="192.168.1.82",
          open="open",
          close="close",
          high="high",
          low="low",
          # Do not pass values before this date
          fromdate=datetime.datetime(2017, 1, 1),
          # Do not pass values after this date
          todate=datetime.datetime(2017, 12, 31))
      
      cerebro.adddata(data_feed)
      
      
      # Analyzer
      cerebro.addanalyzer(btanalyzers.SharpeRatio, _name='mysharpe')
      cerebro.addanalyzer(btanalyzers.AnnualReturn, _name='annual')
      
      thestrats = cerebro.run()
      thestrat = thestrats[0]
      
      cerebro.plot()
      
      
      print('Sharpe Ratio:', thestrat.analyzers.mysharpe.get_analysis())
      print('Anual Ratio:', thestrat.analyzers.annual.get_analysis())
      print('Final Portfolio Value: %.2f' % cerebro.broker.getvalue())
      
      '''
      posted in General Code/Help
      C
      CptanPanic
    • Anyone use backtrader to do live trading on Bitcoin exchange?

      I have set up back testing to work so far, and plan to set it up for at least live manual trade signals if not just full automated trading. I have seen a few questions, but was wondering if anyone has created a live data feed and/or broker for an exchange like gdax, bitfinex, etc.

      posted in General Discussion
      C
      CptanPanic
    • 1 / 1