[{"data":1,"prerenderedAt":618},["ShallowReactive",2],{"project-27414677":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":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":47,"post_text":48,"what":49,"said":74,"maker_in_thread":243,"shape":245,"grid":249,"attempts":580,"same_week":581,"maker_shows":32,"maker_hidden":610,"reader_version":611,"card":612},"27414677","SectorTradingAlgorithm","I discovered a trading algorithm that returns ~24.85% annually","title","Show HN: I discovered a trading algorithm that returns ~24.85% annually","https:\u002F\u002Fgithub.com\u002FKibaeKim\u002FSectorTradingAlgorithm","github.com","_6vhu",1623000560,2021,249,128,152,2533,7,"notable","finance_crypto","algorithmic trading strategy","other",[24,25,26,27,28],"sector etf","mean reversion","backtest","short selling","trading algorithm","mixed",-0.452,{"positive":32,"neutral":33,"mixed":34,"critical":35},1,35,2,36,74,{"performance":38,"idea":41,"execution":43,"docs":44,"pricing":45},{"positive":39,"critical":40},0,16,{"positive":32,"critical":42},13,{"positive":39,"critical":34},{"positive":39,"critical":32},{"positive":39,"critical":46},3,[32,46,46,39,34,39,39,46,34,34,32,34,32,39,32,32,46,46,32,34,32,32,32,46,32,46,46,32,32,46,34,32,39,32,46,32,32,32,32,46],null,{"problem":50,"audience":48,"pricing":48,"motivation":48,"time_to_build":48,"stack":58,"openness":71,"stage":72,"team_size":73},{"value":51,"source":52,"evidence":53},"Finds a simple trading rule that would have produced high backtested returns on sector ETFs","commenter",[54],{"id":55,"by":56,"text":57},"27414678","Kibae","This is a simple trading algorithm I discovered that operates on the Vanguard sector ETFs. This backdating algorithm provides on average a return of ~0.0878% for each trading…",[59],{"value":60,"source":61,"evidence":62},"Node.js (JavaScript)","inferred",[63,67],{"id":64,"by":65,"text":66},"27415854","joneholland","I’m amused that a node app was used to do this rather than a Google sheet. The =GOOGLEFINANCE function is super handy for building backdated simulations.",{"id":68,"by":69,"text":70},"27415940","ffggvv","var total = 0; ``` for (var i = 0; i \u003C performance.length; i++) { total += performance[i]; } var avg = total \u002F performance.length; var tradingDays = performance.length; var…","open_source","prototype","unknown",{"praise":75,"objections":87,"requests":168,"questions":206,"alternatives":227},[76],{"value":77,"source":52,"evidence":78},"Sensible reminder that backtests are not guarantees and paper trading would be a good test",[79,83],{"id":80,"by":81,"text":82},"27416841","bionhoward","Sounds promising if true, and it's cool that you're working on this. What happens when you paper trade with it? Test it going forward and see if it still works, please make…",{"id":84,"by":85,"text":86},"27417076","wernercd","\"Caution Hindsight is 20\u002F20 and because this is a backdating algorithm, similar results are not guaranteed in the future. Use at your own risk.\" You don't say...",[88,111,123,138,157],{"value":89,"source":52,"evidence":90},"Backtest ignores trading costs, slippage and taxes",[91,95,99,103,107],{"id":92,"by":93,"text":94},"27415473","ucha","There are so many misconceptions on this thread about what makes a good quant trading strategy. First of all, if you're shorting US equities and making 25% annually, that would…",{"id":96,"by":97,"text":98},"27415322","happytrader","As previously said, this is probably just mean reversion. It’s a commonly used signal that appears to print money all the time, until you take transaction costs into account. If…",{"id":100,"by":101,"text":102},"27414855","belter","Now add trading commissions :-)",{"id":104,"by":105,"text":106},"27415901","herpderperator","This doesn't take into account taxes. If you are consistently profitable on a yearly basis you're expected to pay 100% of last year's capital gains split into Estimated Taxes…",{"id":108,"by":109,"text":110},"27417133","MR4D","Clearly the author does not have real world experience with this algorithm. If so, it would be clear that buying anything at the opening price is not easy.",{"value":112,"source":52,"evidence":113},"Average return misleads; annualizing by summing daily returns is wrong and volatility or drawdown is unreported",[114,118,122],{"id":115,"by":116,"text":117},"27415821","ryanmonroe","As others have said, \"Average return is just one statistic\". When trading, losses hit harder than wins. Go up 50% then down 50% and you're not even, you're down 25%. The degree…",{"id":119,"by":120,"text":121},"27415372","Majromax","Average return is just one statistic. You can earn an arbitrarily high daily average return by taking an ordinary strategy (e.g. buy and hold the S&P 500) and applying large…",{"id":68,"by":69,"text":70},{"value":124,"source":52,"evidence":125},"Strategy is simple mean reversion that is widely known and would decay",[126,130,134],{"id":127,"by":128,"text":129},"27415287","lend000","Congrats. While it can be exciting to come up with a profitable algorithm, publicizing a mean reversion algorithm is counterproductive if you intended to make any money with it.…",{"id":131,"by":132,"text":133},"27415327","dmillar","There's no overfitting in the traditional\u002Fmodel sense here. This is a pretty rudimentary momentum strategy (long best performers). Implementing this on any kind of scale would be…",{"id":135,"by":136,"text":137},"27415222","elcomet","Another issue is that once the algorithm becomes known, and used be many people, it will not work any more.",{"value":139,"source":52,"evidence":140},"Likely overfitting and survivorship or multiple-testing bias",[141,145,149,153],{"id":142,"by":143,"text":144},"27415116","xwdv","You did not discover a trading algorithm that returns ~24.85% annually. You massaged an algorithm until it produced a 24.85% annual return training on historical data. Come back…",{"id":146,"by":147,"text":148},"27415214","AS37","Overfitting, even on a 20 year dataset.",{"id":150,"by":151,"text":152},"27415733","quantumofalpha","Multiple hypothesis testing. This particular attempt seemed to have succeeded. But how many were tried that didn't? If you torture the data long enough it will confess.",{"id":154,"by":155,"text":156},"27415223","praptak","No, because of the survivorship bias. People invent many algorithms all the time. You only hear about the ones which turned out exceptionally well.",{"value":158,"source":52,"evidence":159},"Shorting risks large losses and unexplained rationale for why it earns money",[160,164],{"id":161,"by":162,"text":163},"27416918","seoaeu","The concern with these sorts of strategies is that you might discover the problem quickly. Say for instance if the stock you shorted doubles in value and you lose all your money.…",{"id":165,"by":166,"text":167},"27415579","hazard","There's kind of a lot of missing pieces here: * This is a simple strategy, which is fine, but also means you are not the only person who has noticed this. Why do you think this…",[169,175,180,194,202],{"value":170,"source":52,"evidence":171},"Report Sharpe ratio, drawdown and volatility",[172,173,174],{"id":165,"by":166,"text":167},{"id":127,"by":128,"text":129},{"id":119,"by":120,"text":121},{"value":176,"source":52,"evidence":177},"Include trading fees and slippage in backtest",[178,179],{"id":119,"by":120,"text":121},{"id":127,"by":128,"text":129},{"value":181,"source":52,"evidence":182},"Specify backtest time period",[183,187,190],{"id":184,"by":185,"text":186},"27415395","zucker42","Over what time period was the 24.85% measured? This seems like it would do better during time periods where stock prices are volatile and\u002For not increasing, so if the returns…",{"id":188,"by":69,"text":189},"27415251","what time period did you backdate over? i’m curious what the backdated return would be for different time periods",{"id":191,"by":192,"text":193},"27417365","hmate9","Now Backtest it from 2015 onwards. 4% yearly return. All your returns come from the first 2-3 years.",{"value":195,"source":52,"evidence":196},"Paper trade or live-test and report results",[197,198],{"id":80,"by":81,"text":82},{"id":199,"by":200,"text":201},"27415280","frakkingcylons","Hook it up to interactive brokers for a year and update us!",{"value":203,"source":52,"evidence":204},"Test parameter sensitivity and robustness",[205],{"id":165,"by":166,"text":167},[207,212,223],{"value":208,"source":52,"evidence":209},"What time period was the 24.85% measured over?",[210,211],{"id":184,"by":185,"text":186},{"id":188,"by":69,"text":189},{"value":213,"source":52,"evidence":214},"What platforms or software does the algorithm work on?",[215,219],{"id":216,"by":217,"text":218},"27444864","slava_kiose","What platforms does the algorithm work on?",{"id":220,"by":221,"text":222},"27415130","Exuma","What software do you use to implement algorithms like this? Do you have to write your own python\u002Fother scripts and interact with trading API's for whatever service you use, or…",{"value":224,"source":52,"evidence":225},"Why does this strategy make money and what risk is compensated?",[226],{"id":165,"by":166,"text":167},[228,232,239],{"value":229,"source":52,"evidence":230},"Momentum and mean reversion strategies from academic literature (Jegadeesh-Titman)",[231],{"id":131,"by":132,"text":133},{"value":233,"source":52,"evidence":234},"Alpaca trading contest",[235],{"id":236,"by":237,"text":238},"27415012","ArtWomb","This is mean reversion, right? Essentially fading market volatility. I recall an article on Bloomberg about a quant fund using VIX ETNs to implement something similar. Gradually…",{"value":240,"source":52,"evidence":241},"Google Sheets GOOGLEFINANCE for backdated simulations",[242],{"id":64,"by":65,"text":66},{"comments":39,"answered":39,"key":244},[],{"commenters":246,"max_depth":247,"maker_replies":39,"first_comment_mins":39,"lifespan_hours":248},80,8,333,[250,252,256,258,260,264,267,269,271,274,277,280,283,286,288,291,295,298,301,303,305,308,311,314,318,320,322,324,327,331,334,336,340,342,345,348,350,351,353,357,360,362,365,367,369,373,376,378,381,383,386,388,390,394,397,400,404,406,408,411,414,416,418,421,424,427,429,432,435,438,440,444,446,450,454,456,459,462,464,468,472,476,478,481,484,487,489,492,495,497,500,503,505,507,510,514,517,519,520,522,523,525,527,529,531,533,534,535,537,539,541,543,545,549,550,551,553,555,556,558,561,564,567,569,572,574,576,578],[115,39,32,251,116,39],"project\u002Fcritical\u002Fperformance",[253,39,39,254,255,39],"27415978","commenter\u002Fneutral\u002Fnone","hervature",[257,39,39,254,116,39],"27416497",[259,39,39,254,255,39],"27417619",[261,39,46,262,263,39],"27416016","project\u002Fneutral\u002Fperformance","jiofih",[265,39,39,254,266,39],"27416975","whoisburbansky",[268,39,39,254,263,39],"27421781",[270,39,39,254,266,39],"27423520",[272,39,46,262,273,39],"27416879","joppy",[275,39,39,254,276,39],"27516164","SomewhatLikely",[278,39,39,254,279,39],"27417799","a1369209993",[281,39,39,254,282,39],"27417996","economusty",[284,39,46,262,285,39],"27424345","nwallin",[92,32,46,287,93,39],"project\u002Fmixed\u002Fperformance",[289,32,32,251,290,39],"27415792","paulpauper",[292,32,39,293,294,39],"27415904","other\u002Fneutral\u002Fnone","yaitsyaboi",[296,32,39,293,297,39],"27417255","blake1",[299,32,39,254,300,39],"27417304","nl",[302,32,39,254,297,39],"27417324",[304,32,39,293,294,39],"27419617",[306,32,39,293,307,39],"27425837","sbierwagen",[309,32,39,293,310,39],"27417547","akg_67",[312,32,39,293,313,39],"27417677","kirse",[315,32,39,316,317,39],"27418954","other\u002Fneutral\u002Fdocs","knr2345",[165,34,46,319,166,39],"project\u002Fneutral\u002Fidea",[127,46,46,321,128,39],"project\u002Fmixed\u002Fidea",[55,323,46,319,56,39],4,[325,323,32,251,326,39],"27415809","chasebank",[328,323,46,329,330,39],"27417024","project\u002Fneutral\u002Fnone","jalopy",[332,323,39,293,333,39],"27417150","fullstackchris",[335,323,46,319,310,39],"27417534",[337,338,32,339,290,39],"27415718",5,"project\u002Fcritical\u002Fidea",[119,341,32,251,120,39],6,[343,341,39,254,344,39],"27415795","jliptzin",[346,341,32,251,347,39],"27416816","X6S1x6Okd1st",[349,341,32,251,120,39],"27418039",[236,18,46,319,237,39],[352,18,46,319,56,39],"27415085",[354,18,46,355,356,39],"27415803","maker\u002Fneutral\u002Fnone","Grustaf",[358,18,39,254,359,39],"27417017","sowbug",[361,18,32,251,109,39],"27417184",[363,18,39,293,364,39],"27419012","andyxor",[366,18,39,293,356,39],"27419421",[368,247,39,293,109,39],"27417213",[370,371,32,339,372,39],"27416419",9,"EMM_386",[374,371,39,316,375,39],"27417434","joshxyz",[96,377,32,251,97,39],10,[379,380,39,293,300,39],"27417350",11,[64,382,39,293,65,39],12,[384,42,32,339,385,39],"27415714","TacticalCoder",[220,387,46,355,221,39],14,[389,387,46,355,56,39],"27415147",[391,387,46,392,393,39],"27415361","project\u002Fneutral\u002Fexecution","droobles",[395,387,39,293,396,39],"27415958","pc86",[398,387,46,329,399,39],"27416326","asperous",[401,402,46,319,403,39],"27415210",15,"throwaway4good",[405,402,46,319,56,39],"27415238",[407,402,32,251,403,39],"27415279",[409,402,39,254,410,39],"27415301","mypalmike",[412,402,32,251,413,39],"27415315","repsilat",[415,402,39,254,403,39],"27415340",[417,402,46,319,403,39],"27415375",[419,402,32,251,420,39],"27417965","panarky",[422,402,46,319,423,39],"27415317","vmception",[425,402,46,319,426,39],"27416652","Closi",[428,402,39,293,423,39],"27419233",[430,40,32,339,431,39],"27417083","lightbendover",[104,433,32,434,105,39],17,"project\u002Fcritical\u002Fnone",[436,433,39,254,437,39],"27570540","CawCawCaw",[199,439,46,392,200,39],18,[441,442,39,293,443,39],"27417177",19,"S_A_P",[191,445,32,251,192,39],20,[447,448,39,293,449,39],"27415290",21,"dezmou",[451,452,39,293,453,39],"27422096",22,"InfiniteRand",[188,455,46,262,69,39],23,[457,455,46,458,56,39],"27415302","maker\u002Fneutral\u002Fdocs",[68,460,32,461,69,39],24,"project\u002Fcritical\u002Fexecution",[108,463,32,461,109,39],25,[465,466,39,293,467,39],"27421462",26,"insaider",[469,470,32,339,471,39],"27416006",27,"johnwheeler",[473,474,46,319,475,39],"27416452",28,"mgamache",[184,477,46,262,185,39],29,[100,479,46,480,101,39],30,"project\u002Fneutral\u002Fpricing",[482,479,46,483,56,39],"27415102","maker\u002Fneutral\u002Fpricing",[485,479,46,329,486,39],"27415118","verdverm",[488,479,46,329,410,39],"27415318",[490,479,39,254,491,39],"27415321","hungryforcodes",[493,479,32,494,403,39],"27415235","project\u002Fcritical\u002Fpricing",[496,479,32,494,403,39],"27415263",[498,479,39,499,93,39],"27415310","commenter\u002Fneutral\u002Fpricing",[501,479,32,494,502,39],"27415293","Animats",[504,479,46,480,413,39],"27415341",[506,479,46,480,420,39],"27415865",[80,508,338,509,81,39],31,"maker\u002Fpositive\u002Fidea",[511,512,39,293,513,39],"27419060",32,"htrp",[84,515,32,516,85,39],33,"project\u002Fcritical\u002Fdocs",[216,518,46,392,217,39],34,[142,33,32,339,143,39],[521,33,46,262,221,39],"27415181",[146,33,32,251,147,39],[524,33,46,262,221,39],"27415240",[526,33,39,254,143,39],"27415281",[528,33,39,254,221,39],"27415306",[530,33,39,254,143,39],"27415368",[532,33,39,254,221,39],"27415393",[161,33,32,339,162,39],[131,33,32,251,132,39],[536,33,39,254,221,39],"27415345",[538,33,39,254,132,39],"27415400",[540,33,39,254,221,39],"27415405",[542,33,46,319,147,39],"27415331",[544,33,39,254,221,39],"27415366",[546,33,39,547,548,39],"27415644","commenter\u002Fneutral\u002Fidea","0-_-0",[150,33,32,251,151,39],[135,33,32,339,136,39],[552,33,32,339,143,39],"27415296",[554,33,39,547,491,39],"27415343",[154,33,32,339,155,39],[557,33,32,251,132,39],"27415234",[559,33,32,339,560,39],"27415239","Jeff_Brown",[562,33,39,293,563,39],"27415299","iamadog4",[565,33,32,339,566,39],"27415370","nlh",[568,33,32,339,356,39],"27415835",[570,33,39,254,571,39],"27416000","teachingassist",[573,33,39,254,356,39],"27416112",[575,33,39,293,69,39],"27415864",[577,33,39,254,423,39],"27415208",[579,33,46,319,356,39],"27415861",[],[582,587,592,597,601,606],{"id":583,"name":584,"points":585,"category":586},"27421408","ToolJet",429,"web_saas",{"id":588,"name":589,"points":590,"category":591},"27434254","nettu-meet",154,"learning_science",{"id":593,"name":594,"points":595,"category":596},"27408326","Rustpad",143,"dev_tools",{"id":598,"name":599,"points":600,"category":586},"27379310","Vistimo Quotes",136,{"id":602,"name":603,"points":604,"category":605},"27384949","Spot",125,"productivity",{"id":607,"name":608,"points":609,"category":596},"27412445","Prestige",117,false,"v2",{"id":613,"name":5,"line":6,"ai":610,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":614,"top":18,"kw":615,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":616,"url":9,"mix":617,"praise":77,"objection":89,"sub":21},27414677,-0.45,[24,25,26,27,28],"1330200322121011331211131331132101311113",[32,33,34,35],1794036607553]