Navigation

    Backtrader Community

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

    oakenstream

    @oakenstream

    0
    Reputation
    19
    Profile views
    14
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    oakenstream Unfollow Follow

    Latest posts made by oakenstream

    • Finding the winner on a larger number of securities

      I'm running my strategies across a large number of securities (200+) I know that some are better than others for some type of systems. I dont have to trade them all, I just want the 30 top performers. What would the best way be to find out which ones my strategy have worked the best on. Would I write the transaction to a CSV-file and sort into Excel or something like that?

      Thanks!

      posted in Indicators/Strategies/Analyzers
      oakenstream
      oakenstream
    • RE: Update on position gains

      Ok, I understand it now! thanks!

      posted in General Code/Help
      oakenstream
      oakenstream
    • RE: Same entry, different exits

      Ok, thanks both! I will experiment with this approach.

      posted in Indicators/Strategies/Analyzers
      oakenstream
      oakenstream
    • RE: Same entry, different exits

      I understand that sounds very reasonable of course.

      I'm thinking along these lines: I want to keep a bunch of "exits" in a folder somewhere and then I can combine the current entry with those exits. If this could be modularized I dont have to paste in 15 exits into each strategy class.

      posted in Indicators/Strategies/Analyzers
      oakenstream
      oakenstream
    • Same entry, different exits

      Hey,

      this might be a bit hard to explain, but I would like to test a strategy with the same buying condition but with varying sellling conditions. Like sell when < 200ma or sell at first profit or after 7 days.

      Do anyone have a suggestion how to do that. Would I write different strategies for each one and then run them with a shell script to compare or could I modularize the exit-criteria somehow to not have so much duplicate code?

      I hope I could explain it in a good way.

      Regards

      posted in Indicators/Strategies/Analyzers
      oakenstream
      oakenstream
    • RE: Why do analyzers seem to start calculating on data feeds' start date instead of first order date?

      I have the opposite result. I have multiple feeds, about ~100. My annual return gets calculated from 2016, but most of my data starts in 2007.

      ===============================================================================
      AnnualReturn:
        - 2016: 0.17989527927894033
        - 2017: 0.2342377414639476
        - 2018: -0.04878029921676286
        - 2019: 0.6714767320608188
        - 2020: 0.13523159391989115
      

      I would like to see a full list of annual returns from 2007.

      posted in General Code/Help
      oakenstream
      oakenstream
    • RE: Fast Stochastic with low period

      Explanation here:
      https://community.backtrader.com/topic/98/float-division-by-zero/5

      posted in General Code/Help
      oakenstream
      oakenstream
    • Update on position gains

      Hey,

      I want to check if there are any updates on how to get the gains or losses of a position. I want this to implement the "sell after X days or after the first day in profit"

      Re: Find if an open position is a losing position

      posted in General Code/Help
      oakenstream
      oakenstream
    • RE: Optimization with multiple feeds

      @backtrader said in Optimization with multiple feeds:

      @oakenstream said in Optimization with multiple feeds:

      I dont exactly see where it is

      Neither does the rest of us.

      I removed this optreturn and it worked:

      cerebro = bt.Cerebro(optreturn=False)
      

      @oakenstream said in Optimization with multiple feeds:

      Hey, is it possible to optimize with multiple feeds?

      Yes, we can.

      Ok, thanks!

      posted in General Code/Help
      oakenstream
      oakenstream
    • Fast Stochastic with low period

      Hey,

      I want to use the fast stochastic's K value and check when that one crosses under 10 from a strategy in a book. I'm doing this:

      self.inds[d]['faststoch'] = bt.indicators.Stochastic(d, period= 2)
      

      and I'm geting this:

      ZeroDivisionError: float division by zero
      

      the definition of the fast stochastic is I beleive:

      %K = (C – L) / (H – L) * 100
      %D = 3 days smoothing
      

      I would like only to use the %K value. Is this possible?

      posted in General Code/Help
      oakenstream
      oakenstream