[{"data":1,"prerenderedAt":303},["ShallowReactive",2],{"project-8644636":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":41,"post_text":44,"what":45,"said":75,"maker_in_thread":185,"shape":193,"grid":197,"attempts":264,"same_week":265,"maker_shows":31,"maker_hidden":295,"reader_version":296,"card":297},"8644636","Prophet","A financial micro-framework in Python","title","Show HN: Prophet – A financial micro-framework in Python","http:\u002F\u002Fblog.michaelsu.io\u002Fannouncing-prophet\u002F","blog.michaelsu.io","Emsu",1416627494,2014,152,32,164,2272,8,"notable","finance_crypto","backtesting framework","library",[24,25,26,27],"backtesting","trading strategies","python","quantitative finance","roasted",-0.167,{"positive":31,"neutral":32,"mixed":33,"critical":34},2,3,0,6,11,{"docs":37,"execution":38,"idea":40},{"positive":31,"critical":33},{"positive":33,"critical":39},4,{"positive":33,"critical":31},[42,43,33,33,33,33,33,33,32,32,33,33,33,43,43,33,43,33,33,43,33,42,33,32,33,33,33,33,33,43,33,33],5,1,null,{"problem":46,"audience":44,"pricing":44,"motivation":44,"time_to_build":44,"stack":57,"openness":73,"stage":74,"team_size":74},{"value":47,"source":48,"evidence":49},"Testing trading strategies against historical price data","inferred",[50,53],{"id":51,"by":11,"text":52},"8645411","If you look at: https:\u002F\u002Fgithub.com\u002FEmsu\u002Fprophet\u002Fblob\u002Fmaster\u002Fprophet\u002Fdata.py There's a PandasDataGenerator which is a wrapper around the pandas libary's DataReader. For the Yahoo…",{"id":54,"by":55,"text":56},"8645335","minimax","Why do you say you can't reliably get the closing price? You should be able to send an MOC order to the listing exchange to get the official closing price.",[58,65,69],{"value":59,"source":60,"evidence":61},"Python","maker",[62,64],{"id":63},"post",{"id":51,"by":11,"text":52},{"value":66,"source":60,"evidence":67},"pandas",[68],{"id":51,"by":11,"text":52},{"value":70,"source":60,"evidence":71},"Yahoo Finance data via pandas DataReader",[72],{"id":51,"by":11,"text":52},"open_source","unknown",{"praise":76,"objections":89,"requests":125,"questions":148,"alternatives":171},[77],{"value":78,"source":79,"evidence":80},"Clean design and useful for building personal trading frameworks","commenter",[81,85],{"id":82,"by":83,"text":84},"8644844","yummyfajitas","Very nice. I might replace my own personal framework with this - it's certainly cleaner. A suggestion I'd make. Rather than simply taking a price series (which seems to be based…",{"id":86,"by":87,"text":88},"8657223","tummybug","Looks good, I have been working on something similar recently but may just stop and use this. Would love to see the documentation fleshed out more.",[90,101,111,118],{"value":91,"source":79,"evidence":92},"No tests included",[93,97],{"id":94,"by":95,"text":96},"8645093","Cieplak","Very cool. I would like it even more if there were tests :) https:\u002F\u002Fgithub.com\u002FEmsu\u002Fprophet\u002F",{"id":98,"by":99,"text":100},"8646132","michaelmcmillan","Actually, that's not how tests work. Writing a test after the code has been produced should not be considered a real test. Let me quote Robert C. Martin on this. ``` If we lose…",{"value":102,"source":79,"evidence":103},"Backtest uses closing price before it is known and Adjusted Close is unrealistic for execution",[104,107],{"id":105,"by":83,"text":106},"8645375","To be more precise, you can't reliably get the closing price and also know what it is before you get it. If I understand the code right, it looks at the closing price and then…",{"id":108,"by":109,"text":110},"8646576","lrm242","Please don't use Adjusted Close for backtesting execution. Adjusted prices are not real. They never happened, and using them will add unknown error to your backtest results. Back…",{"value":112,"source":79,"evidence":113},"Does not run on Python 3",[114],{"id":115,"by":116,"text":117},"8645532","vegabook","doesn't seem to work on Python 3.",{"value":119,"source":79,"evidence":120},"Name clashes with Sungard's iWorks Prophet",[121],{"id":122,"by":123,"text":124},"8645245","jl6","Might have a name clash issue with Sungard's iWorks Prophet, a commercial financial modelling tool.",[126,136,144],{"value":127,"source":79,"evidence":128},"Support for tick or intraday data",[129,133],{"id":130,"by":131,"text":132},"8645045","jcrubino","Handling tick data even could help and be helped in the case you outlines above.",{"id":134,"by":11,"text":135},"8645415","I actually really want to support it. If only I could get my hands on some tick data... any ideas?",{"value":137,"source":79,"evidence":138},"More documentation and tutorials",[139,143],{"id":140,"by":141,"text":142},"8645318","radarsat1","Would love to see a how-to tutorial on using this to test and visualize different strategies on paper.",{"id":86,"by":87,"text":88},{"value":145,"source":79,"evidence":146},"Open\u002Fhigh\u002Flow based trade execution",[147],{"id":82,"by":83,"text":84},[149,157,164],{"value":150,"source":79,"evidence":151},"Where to get tick or minute-level data",[152,153],{"id":134,"by":11,"text":135},{"id":154,"by":155,"text":156},"8647185","findjashua","You can get 1-minute price bars from Yahoo Finance:…",{"value":158,"source":79,"evidence":159},"Starting resources for quantitative analysis",[160],{"id":161,"by":162,"text":163},"8646766","ochoseis","This looks interesting. I'm familiar with the basics of investing, but have never gotten into quantitative analysis. Does anyone know of a good starting point (book, online…",{"value":165,"source":79,"evidence":166},"APIs to connect to a brokerage",[167],{"id":168,"by":169,"text":170},"8645008","crimsonalucard","Anybody know of any good apis to hook this thing into?",[172,179],{"value":173,"source":79,"evidence":174},"Yahoo Finance historical data",[175,178],{"id":176,"by":83,"text":177},"8645130","To start, free historical data from yahoo. Once you've back tested, try executing manually with your online brokerage (I.e. if it says buy, login to etrade and buy). After that…",{"id":154,"by":155,"text":156},{"value":180,"source":60,"evidence":181},"scipy and statsmodels with CVXOPT for portfolio optimization",[182],{"id":183,"by":11,"text":184},"8648416","The scipy and statsmodels libaries are nice. CVXOPT would be good for portfolio optimization. You really have to implement your own strategies though.",{"comments":186,"answered":43,"key":187},10,[188,191,192],{"id":189,"text":190},"8645393","Definitely adding tests :) The folder's sitting in my local repo and it'll be the next thing I do.",{"id":134,"text":135},{"id":51,"text":52},{"commenters":194,"max_depth":39,"maker_replies":186,"first_comment_mins":195,"lifespan_hours":196},20,110,84,[198,200,204,208,210,212,215,218,220,222,223,225,228,230,232,234,235,236,238,239,240,243,244,247,249,251,252,253,257,258,259,261],[94,33,42,199,95,33],"project\u002Fpositive\u002Fdocs",[201,33,43,202,203,33],"8645275","maker\u002Fcritical\u002Fexecution","1stop",[205,33,33,206,207,33],"8645621","commenter\u002Fneutral\u002Fnone","mikecsh",[209,33,33,206,203,33],"8651956",[98,33,33,211,99,33],"commenter\u002Fcritical\u002Fexecution",[213,33,33,206,214,33],"8646206","myg204",[216,33,33,206,217,33],"8646515","hnriot",[189,33,33,219,11,43],"maker\u002Fneutral\u002Fexecution",[82,43,32,221,83,33],"project\u002Fneutral\u002Fidea",[130,43,32,221,131,33],[134,43,33,224,11,43],"maker\u002Fneutral\u002Fidea",[226,43,33,206,227,33],"8645579","radikalus",[154,43,33,229,155,33],"other\u002Fneutral\u002Fnone",[54,43,43,231,55,33],"project\u002Fcritical\u002Fidea",[105,43,43,233,83,33],"project\u002Fcritical\u002Fexecution",[51,43,33,219,11,43],[108,43,43,233,109,33],[237,43,33,219,11,43],"8648412",[161,31,33,229,162,33],[122,32,43,231,123,33],[241,32,33,242,11,43],"8648413","maker\u002Fneutral\u002Fnone",[86,39,42,199,87,33],[245,39,33,246,11,43],"8658135","maker\u002Fneutral\u002Fdocs",[140,42,32,248,141,33],"project\u002Fneutral\u002Fdocs",[250,42,33,246,11,43],"8645402",[168,34,33,229,169,33],[176,34,33,229,83,33],[254,255,33,229,256,33],"8645673",7,"jsc123",[183,255,33,242,11,43],[115,18,43,233,116,33],[260,18,33,219,11,43],"8648421",[262,18,33,263,11,43],"8651665","maker\u002Fpositive\u002Fexecution",[],[266,271,276,281,285,290],{"id":267,"name":268,"points":269,"category":270},"8657454","QuaggaJS",168,"languages",{"id":272,"name":273,"points":274,"category":275},"8644172","TrueJob",161,"web_saas",{"id":277,"name":278,"points":279,"category":280},"8643497","Premium Medical Marijuana Subscription",129,"consumer_social",{"id":282,"name":283,"points":284,"category":275},"8652042","Workshape.io",119,{"id":286,"name":287,"points":288,"category":289},"8641734","Disco Fingers",114,"creative",{"id":291,"name":292,"points":293,"category":294},"8635131","WebGL Playground",89,"dev_tools",false,"v2",{"id":298,"name":5,"line":6,"ai":295,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":299,"top":18,"kw":300,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":301,"url":9,"mix":302,"praise":78,"objection":91,"sub":21},8644636,-0.17,[24,25,26,27],"51000000330001101001050300000100",[31,32,33,34],1793990915814]