Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Alicc
    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/
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 10
    • Best 0
    • Groups 0

    Posts made by Alicc

    • Transformation from datetime(float) to datetime type?

      hi all,

      Seems the datetime in OrderData is of float type. Just want to know how to change float type to regular datetime type, Thanks~

      posted in General Discussion
      A
      Alicc
    • Can the engine see the volume of next bar?

      Hi all, I face a problem on simultaneously execution of multi assets. My strategy needs the backtest engine to execute assets simultaneously ( 4 assets, 2 buy orders and 2 sell orders) in next bar( 5 mins bar or 10 mins bar). So I want to know can I see the volume of next bar in next() function, if I can see the volume of next bar, then I can send no order if there is a leg with 0 volume. Or is there any other solution to this problem. Thanks all.

      posted in General Discussion
      A
      Alicc
    • RE: Got nan value when resampling my own lines in data

      @backtrader I think it's more convenient for me to put the lines into data, because what I am testing is option. I have several option hot contracts of current month and next month with different strikes from 2015-2019 in 1 minute freq. It's time consuming to compute greeks and iv every minute when testing, especially when I need to test different strategy parameters. And there are other statistics like strike price and put/call type. So I first compute all the statistics. Anyway, Can I directly put the statistics already computed into indicators. If not , how could I resample these statistic, just keep the last one . the followings are my lines, thanks 0_1562060663489_QQ截图20190702174403.png

      posted in General Discussion
      A
      Alicc
    • RE: Got nan value when resampling my own lines in data

      @backtrader Because I have computed many statistics, I thought it cannot be uploaded to indicators; BTW can I just upload the statistic already calculated to indicators?

      posted in General Discussion
      A
      Alicc
    • RE: Got nan value when resampling my own lines in data

      @backtrader I fo the update func in_Bar class and I'm planing to rewrite the update func. But how can I get all lines of a GenericCSVData object, thanks!!!0_1562035109153_QQ截图20190702103755.png

      posted in General Discussion
      A
      Alicc
    • RE: Got nan value when resampling my own lines in data

      @backtrader is there any to do with it, e.g to keep the last value of the timeframe?

      posted in General Discussion
      A
      Alicc
    • RE: Got nan value when resampling my own lines in data

      @alicc BTW, what I need is just keep the last value of my own lines, Thanks

      posted in General Discussion
      A
      Alicc
    • Got nan value when resampling my own lines in data

      Hi all,

      I met some problem when resampling my own datafeeds. Besides the default lines OHLC , vol and oi, I added some other lines into data such as PE and Volatility. when I resample it, it's ok for the OHLC, vol,and oi, but my own lines are all nan value. Is there any other params I need to set in the cerebro.resampledata(data, kwargs**)?

      posted in General Discussion
      A
      Alicc
    • RE: Problem on multi datafeeds with different time range

      @ab_trader Thank u. Actually printing is just a test, what I need is that if I can trade the first data before 2017-12-18. For the reason I may test strategies with thousands of instruments with different date range ,and the strategy requires to do some trade earlier when some of data haven't begun, is there any solution to it?

      posted in General Discussion
      A
      Alicc
    • Problem on multi datafeeds with different time range

      Hi all,

      I tested a strategy feeding two data into cerebro . The first data is from 2017-12-01 to 2017-12-31; the second is from 2017-12-18 to 2017-12-31. Both is daily freq. When I printed both of them day by day, the first data before 2017-12-18 was not printed out. What is the problem?

      posted in General Discussion
      A
      Alicc
    • 1 / 1