Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Curtis Miller
    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 1
    • Followers 2
    • Topics 7
    • Posts 25
    • Best 3
    • Groups 0

    Curtis Miller

    @Curtis Miller

    Mathematics graduate student at the University of Utah, studying statistics, often with finance applications. I blog frequently, mostly on statistical programming and finance/economics/politics.

    My blog is here: https://ntguardian.wordpress.com/
    My University of Utah webpage is here: http://math.utah.edu/~cmiller

    8
    Reputation
    1283
    Profile views
    25
    Posts
    2
    Followers
    1
    Following
    Joined Last Online
    Website ntguardian.wordpress.com Location Salt Lake City Age 31

    Curtis Miller Unfollow Follow

    Best posts made by Curtis Miller

    • Walk Forward Analysis Demonstration

      Huzzah! FINALLY I can do a walk-forward analysis, thanks to backtrader. I wrote a blog post demonstrating how to do this (along with a motivation, or why we may want this type of analysis and what it's for) here: https://ntguardian.wordpress.com/2017/06/19/walk-forward-analysis-demonstration-backtrader/

      The post should be enough for now, but if I could make a feature request, I think @backtrader could probably write a built-in method for walk-forward analysis that does basically what I did, but better (faster, or with better syntax maybe). If not, though, that's fine; the loop I wrote is good enough for me.

      posted in General Discussion
      Curtis Miller
      Curtis Miller
    • Getting Started with backtrader (blog post)

      I wrote a blog post (click here) where I develop, manipulate, and backtest a strategy using backtrader. This is meant to be an introduction to the package and hopefully the first in a series. One thing readers here may find interesting is my take on backtesting on multiple symbols.

      Thanks to @backtrader for all his help over the weekend answering my questions and clarifying issues; his prompt responses helped me get this blog post out quickly, in addition for developing what I think is an excellent platform with great documentation. I look forward to continued use.

      posted in General Discussion
      Curtis Miller
      Curtis Miller
    • RE: Implementation of OpenAI Gym environment for Backtrader

      @Андрей-Музыкин It looks interesting, and like there was a lot of work put into it. I may check it out eventually. Good work!

      posted in General Discussion
      Curtis Miller
      Curtis Miller

    Latest posts made by Curtis Miller

    • RE: Renko Bricks

      I'm sorry, but I can't not say it: Renko charts look adorable. The little bricks going up and down are just... so freakin' cute. I wouldn't mind hanging these things up on my wall or storing them in little books or making a quilt out of them.

      Now that that's out of the way, I'm guessing that the Renko filter could be used as a data feed to build strategies so you can do backtests or compute statistics.

      posted in Blog
      Curtis Miller
      Curtis Miller
    • RE: Make calcul with indicator

      @GwadaMan Replace self.sma0.lines.sma(1) with self.sma0.lines.sma(-1). You think you're referencing the past, but positive numbers reference the future, not the past, and strategies should never reference the future, for obvious reasons. This is probably why you are getting nan. Make that change and see if it fixes the problem.

      posted in Indicators/Strategies/Analyzers
      Curtis Miller
      Curtis Miller
    • RE: Stock trading analytics and optimization with PyFolio and R's PerformanceAnalytics (blog post)

      @backtrader said in Stock trading analytics and optimization with PyFolio and R's PerformanceAnalytics (blog post):

      This analyzer should be removed. It was the 1st ever implementation and was never really reworked because TimeReturn (which allows customization of the timeframe independently of the data's actual timeframe) took over.

      Noted.

      Here the proposal would be to create an Indicator first and then use the indicator inside the analyzer. The advantage is that you can plug the indicator directly into the Strategy, in an Observer or in an Analyzer.

      I knew there had to be a better way than what I was doing. Thanks!

      Don't let yourself be bothered by someone who probably only speaks about one single thing at every social event and who only sees peers in those with a PhD an his level of focus in a single topic. This may be wrong and he may be the soul of every party, run marathons every weekend and attend charity events on Tuesdays. Even in that case, don't let yourself be bothered.

      Time is scarce everywhere. Shorter posts will free up some time and you'll probably keep on enjoying your own posting.

      Thanks for the words of encouragement! I'm going to try to keep up the blog but not make an effort to be regular about my posts. That is too much of a commitment. Anyway, I appreciate the thought.

      posted in General Discussion
      Curtis Miller
      Curtis Miller
    • RE: YahooFinanceData gets displayed invalid due to changed adjusted close

      backtrader expects its data feeds to be in OHLCV format, which means there should not be a column Adj Close. You could use the backtrader data feeds dedicated to Yahoo! Finance data. Otherwise, you will need to remove the Adj Close column (use it to adjust all columns: see my blog post on doing this). Perhaps load your data into a pandas DataFrame and use that as the data feed.

      Word on the street is that Yahoo! Finance data isn't what it used to be.

      posted in General Code/Help
      Curtis Miller
      Curtis Miller
    • Stock trading analytics and optimization with PyFolio and R's PerformanceAnalytics (blog post)

      I've written a new blog post on using backtrader. In this article, I discuss performance analytics using backtrader Analyzers, writing custom Analyzers, using R PerformanceAnalytics functions in backtrader Analyzers, and PyFolio. I also took my walk forward analysis code and turned it into a function, for easier use.

      I would love to hear feedback.

      posted in General Discussion
      Curtis Miller
      Curtis Miller
    • RE: Implementation of OpenAI Gym environment for Backtrader

      @Андрей-Музыкин It looks interesting, and like there was a lot of work put into it. I may check it out eventually. Good work!

      posted in General Discussion
      Curtis Miller
      Curtis Miller
    • RE: idea

      I don't know how the live trading logic works with backtrader but this logic might need to be handled not by backtrader but by other Python functionality or at the OS level.

      posted in General Discussion
      Curtis Miller
      Curtis Miller
    • RE: Order

      @KT If a built-in indicator is not defined (and maybe check PyFolio and read about PyFolio integration), you may need to define your own analyzers to do this: see documentation on analyzers, and an analyzers reference with list of provided analyzers.

      posted in General Discussion
      Curtis Miller
      Curtis Miller
    • RE: Starting strategy later while using get(ago,size)

      @backtrader said in Starting strategy later while using get(ago,size):

      Assuming you mean next, it could suffice with adding a Simple Moving Average of at least 288 periods.

      Or instead in next() you insert a line prior to all code responsible for managing trades, if len(self.data0) > 288:, but as @backtrader said, it's hard to know what's going on without a code sample.

      posted in Indicators/Strategies/Analyzers
      Curtis Miller
      Curtis Miller
    • Walk Forward Analysis Demonstration

      Huzzah! FINALLY I can do a walk-forward analysis, thanks to backtrader. I wrote a blog post demonstrating how to do this (along with a motivation, or why we may want this type of analysis and what it's for) here: https://ntguardian.wordpress.com/2017/06/19/walk-forward-analysis-demonstration-backtrader/

      The post should be enough for now, but if I could make a feature request, I think @backtrader could probably write a built-in method for walk-forward analysis that does basically what I did, but better (faster, or with better syntax maybe). If not, though, that's fine; the loop I wrote is good enough for me.

      posted in General Discussion
      Curtis Miller
      Curtis Miller