big papi edition>quant newshttps://www.ft.com/quant-investinghttps://alphapulse.org (beta version)>videoshttps://www.youtube.com/watch?v=OhGdVdolqkU [Embed] [Embed]https://www.youtube.com/playlist?list=PLRFLF1OxMm_UL7WUWM31iynp0jMVf_vLW>introshttps://www.quantstart.com/articles/Successful-Backtesting-of-Algorithmic-Trading-Strategies-Part-I/>defi/mevhttps://docs.flashbots.nethttps://medium.com/@solidquant/how-i-built-my-first-mev-arbitrage-bot-introducing-whack-a-mole-66d91657152ehttps://ethereum.github.io/yellowpaper/paper.pdfhttps://news.polymarket.com/p/automated-market-making-on-polymarket>recommended AI/LLM (plugs into Claude Code CLI), $3/mo:https://z.ai/model-api (top performance, plugs into Claude Code CLI, only $3/mo!!)>bookshttps://github.com/zslucky/algorithmic_trading_bookhttps://www.amazon.com/Quantitative-Momentum-Practitioners-Momentum-Based-Selection/dp/111923719X>recommended brokersstocks and options - https://alpaca.markets (Robinhood doesn't have an official API)futes - https://www.tradovate.com (modern API)crypto - https://www.kraken.com (get free data: https://support.kraken.com/articles/360047543791-downloadable-historical-market-data-time-and-sales-)>githubs & stuffhttps://skfolio.orghttps://github.com/joelowj/awesome-algorithmic-trading?tab=readme-ov-file>discord code (???)
>halloween eve upd8For want of better a documentation workflow (eg, AI assisted mermaid diagrams rendered inline), I've been taking a detour to set up Zed, for a minimal config and GPU-native experience over Emacs. I thought it could render Mermaid diagrams out of the box (that's what ChatGPT said), but I had to write a custom extension. >zed vs emacsEmacs can render Mermaid how I want, but everything is just a lot more janky. Since Zed is GPU native, it just kinda fit what I wanted more, and honestly, for the most part, everything "just werks". It's nice not having any config overhead, it's written in Rust so it came with the LSP pre-installed for it, AI integration is first class, etc. I think I'm gonna stick with it, even if it means leaving org-mode (trying to write an LSP that uses a headless emacs to get basic org features working cheaply). It has some other quirks but it's a young project and open source so I feel good about the switch. >documentation / rustdocsI find high quality docs / formal spec pays for itself, especially with LLMs, since I need to feed it context so often, and I really wanted a good workflow for LLM assisted diagram generation and viewing so it wasn't such a maintenance burden. Rust documentation in particular is a killer feature, since you can import/export sections of documentation (and diagrams) to code files, so in theory that should help keep consistency between documented design and implemented code, with minimal documentation surface area.The key with the documentation this time around will be to keep it as dynamically generated as is reasonable, and integrated into the code (eg, structs and schemas should exactly match what's documented, and either the test suite or a linter should pull from docs to confirm and catch any specification drift). So the rustdoc imports will be clutch to lower the maintenance burden. Bit of a detour but I think it's worth it.
>>61228202Oh, another thing with Zed is the GPUI library is killer. I think I'm going to end up using it for my trading framework UI (and embed the framework in Zed as an extension for Zed users). Since it renders with GPU, and can do 120fps, you could use it as basically an algotrading IDE with live charting and visual, Jupyter, etc. What better place to do that work than within an editor?
>>61227876>Discord codeapXbwjHxK4Its a permanent link in the new members channel
>>61228202So those diagrams are actually generated on the fly?
>>61228709Thanks I'll add that next time>>61228748They're generated from Mermaid code blocks, but rendered on the fly in the separate pane, yeah. On my latest refactor/rewrite, I'm hoping to have some dynamic diagram generation depending on how the system is configured though. So for a defi arb profile, it'd give me a composite diagram of the different services / modules being used. I only see that being sustainable / maintainable if it's dynamically generated. But it'd be helpful for me so I could get assurance on how things are wired up and which code paths are executing.
>>61228836>They're generated from Mermaid code blocks, but rendered on the fly in the separate pane, yeahThats sick
>>61228860Yeah it's gonna be so frikcn helpful. Now I can have in-editor AI edit the diagram code right in front of me and watch the diagram update live. I think it'll be a positive feedback loop, eg docs easier to maintain --> better docs --> better code --> code easier to maintain.
>>61227876>https://github.com/joelowj/awesome-algorithmic-trading?tab=readme-ov-filehttps://training.experfy.com/courses/algorithmic-trading-strategieslink is ded, any archive?
>>61229339>training.experfy.com/courses/algorithmic-trading-strategiesLooks like it's paywalled:https://training.experfy.com/courses/advanced-algorithmic-trading-workshop-strategies-signals-and-pipelines, maybe some torrent site has it
>>61227876So I am reading through the books you suggested in my spare time, at the ML part of Advanced Algorithmic trading and I caught myself wondering.. So both my P. Chan and Micheal reads are quite dated. Is there anything more recent you can think of that just focuses on ML? Also id like to say that I have one issue with Michael and its just the lack of image examples. How am I supposed to understand without the line going up huh?
>>61230575>So both my P. Chan and Micheal reads are quite dated. Is there anything more recent you can think of that just focuses on ML?The typical recommendation for this is Marco de Lopez's "Advanced in Financial Machine Learning", I have it my shelf and thumbed through it, read a few sections. I applied his meta-labeling technique too. >Also id like to say that I have one issue with Michael and its just the lack of image examplesDid you read the part that covers all the display/graphical stuff? Like parameter heatmaps, etc? But yeah fair enough, though I enjoyed the typesetting.
>>61231004I remember pouring over time for a company doc to make it the most beautiful doc ever made, taking inspiration from some game design docs from 1990. And I show it to a prospective business and administration hire, that eyes it and says: it looks retro. Like something oldMy heart crushed all at once
>>61230575Also, while not strictly ML, this book is cool:https://algorithmsbook.com/decisionmaking/But I haven't finished reading it yet. It's used in this coursehttps://aa228.stanford.eduhttps://www.youtube.com/watch?v=PgPNfPhG4Wcgiven that this all about 'decision making under unertainty', it's bound to be applicable. the whole series at algorithmsbook.com has that uncertainty/probablity theme.
>>61231004>>61231025Alright, thanks I will write it down and try to get to it eventually
>>61231017some people just have no taste anon
>>61231074It has a free pdf link on that page too. speaking of, what happened to Libgen? Anyone know? It’s been down like all year.
spooky bump
>>61231087Aye.. true that
i do algo trading, have bots checking prices of around 700 pairs at once, only lost me money so far, was able to live of it for 2 years during covid, been doing it for 5 years it's fucking hard and i wish i never started and just held. always tuning your algo, not trying to overfit, works 4 months, then catastrophic trade losing all your gains. anyone thinking of starting this, just fucking buy and hold
>>61233076what about the ev of the strategies you implemented? play the long game retard
>>61228202Imagine bragging about setting up tools and also being filtered out by Emacs Show us any code, retard, it at least one no -bullshit idea
>>61228270And this is exactly why it should be embedded within Emacs, you fucking narcissistic clown. All your babbling is trivial to anyone with a couple of working brain cells. So, which strategy or what approach?
>>61227876sad that there is nothing for crypto that respects the original idea, to have free sound money without government nonsense like kyc
>>61228836why the fuck would you add that shit? general makers are fucked in the head with their stupid discords
>>61233382You won't be able to cash out either, at least without your bank and the govt. knowing
>>61233406you could do cash mail orders, at least monero has ways for this. only really missing a platform where i can do degenerate leveraging longs and shorts
>>61233203So, how profitable are you? How many trades you do a month, year? How long are you holding? How would your strategy have skipped LUNA or FTT?
>>61233311>>61233297>And this is exactly why it should be embedded within Emacs, you fucking narcissistic clown.What? Lol, I'm not being "filtered" by Emacs, I've used it for the past ten years. Nor am I bragging, just blogposting to keep this thread alive. Zed is just a lot more suitable for what I'm after right now, being that it's a GUI editor rendered via GPU.>Show us any code>So, which strategy or what approach?That's not how this works, retard.>>61233076Are you just doing statistical correlation? How does your Sharpe look, and do you apply leverage?
^*statsitical arbitrage I meant
>>61233485And do you have any advice or framework for when deciding to kill/retire an algo? The best solution I've been able to come up with is to use the backtested Sharpe to get a probability distribution concerning expected performance and cut it off after it exceeds some percentile, like if you have a 3-4 Sharpe, you should almost never have three red days consecutively or more than X losses over some time period Y. Something like that would give me a good way to gauge if the model is drifting substantially from expected performance.
>why the fuck would you add that shit? general makers are fucked in the head with their stupid discordsadd what, mermaid diagram rendering?......because graphs and diagrams are useful for complex systems? I mean just look at pic related for example. super helpful, had claude read my docs and code and generate this real quick - incredibly handy.
>>61235886meant for this retard: >>61233389and check out another example, this is just one sub-component of an individual module blown up. Diagrams can link to sub-diagrams, and down into the files and code itself. this is YUGE, ideally the documents are like a formal spec and there's testing/linting to keep things on track, some dynamic graph generation so the doc maintenance cost is minimized to get all the upside with minimal downside.
This thread is a meme isn't it
>>61236281why do tyou say that, how dare you
>try to write my own backtester to use my own data>apparently my strategy is amazingly profitablei look over the code over and over but cant find the bug and its annoying me.
>>61236519event driven or vectorized? if you can share the code without sharing the strategy logic I can take a quick and cheeky peekit's probably look ahead bias. out of curiosity, what happens if you backtest with wider/narrower stops? might narrow down where the bug lives if it gets better and better with unreasonably tight stops
>>61236556im just going candle by candle testing if the low has breached the stop loss then the high has breached the take profit. nothing advanced. im just going to create an implementation using an established library. its for the best. thanks for the offer though.
>>61236632>im just going candle by candle testing if the low has breached the stop loss then the high has breached the take profit.this is where it gets easy to introduce look ahead bias. At current candle t, you have to make sure you're only using information up to candle t-1 (the previous candle). All your operations in pandas, your indicator logic, stop loss / take profit has to operate the same way and can't use current candle t as input to make decision, only up to t-1.it may sound obvious enough but in reality it's very easy to something to slip by when using a vectorized backtester. an event driven approach makes this sort of error impossible by design.
just telling yallnone of you know shit about strategy development go read your fucking books lmao
>>61236748care to enlighten us, retard?
>>61236748>BooksLmao
>>61236854
>>61236752neverMY IP OF NON LINEARITY STAYS W ME NIGGA
>>61236944Lmfao
>>61236994>Nigga posta needed non linearity Roflmao
What kind of lying whore resistivity do you guys use? The markets a lying bitch once you learn how to not listen to her bullshit cuz she always comes home she's like iM goNnA fUcK oThEr MeN every two seconds eventually you learn she's too in love with you to do anything else it's just her mom was such a fucking nut she doesn't know how else to behave
>>61236994I was just kidding when I asked for your enlightenment, you are an algoless schizophrenic
>>61233485NTA, but I'll answer>So, how profitable are you?about 200% profit thus far>How many trades you do a month, year?Can't say the exact amount as it might deanonymize me, but at minimum a dozen thousand a month>How long are you holding?Less than 1 minute>How would your strategy have skipped LUNA or FTT?A LUNA or FTT collapse would make me a lot of money, black swans are my friend not my enemy.
>>61237429do you even know how to backtest properly? lmao
>>61235778I went with .NET 4.8 because it has long support. But now we're at .NET 10 so i'll have to rebuild some apps. I also do my own data collecting, so have apps to merge files and to analyze data, i've updated those the the new frameworks. But the main app is massive by this point, so it's going to be a task to upgrade.My sharpe ratio is around 1.7, but i do low frequent trades, i might not trade anything fro 3 months and then scoop up crypto on the crash like the 10 of october, and make a 30% gain. Mu strategy is mostly based around bollinger bands. But my pitfall was a bit trying to extend to hundreds of crypto's, now i got data on multiple rug pulls tho. But yeah, if you're trying to buy massive drops you'll end up scooping up a rugpull on Kucoin for example which nobody was buying anyway. I think that was an error on my part. >>61237455That's decent, but i'm not seeing how if you do a lot of trades you'll be able to skip and wait for these special events where everything drops massivly. Also, how long have you been doing it?I'm now at 8 - 10 trades a year, but they net me on average 10 - 15% each trade. So it's ok. And the algo has been going correctly on 5 years of full data of hundreds of coins/tokens.
>>61237645>That's decent, but i'm not seeing how if you do a lot of trades you'll be able to skip and wait for these special events where everything drops massivly.Have you ever heard of HFT, Market Making, or Arbitrage? Little pennies can add up, and occasionally even dollars appear.
>>61237648Yeah, but if i test a strategy like that it might work for months, adding small percentages, in an out, and then you'll have 2 -20% trades where you lose all your gains, because you bought too fast.
>>61237650>and then you'll have 2 -20% trades where you lose all your gains, because you bought too fast.There are ways to hedge against this, for example as a market maker you generally want to be delta neutral and positive gamma.
>>61237648Also i can make almost any algo and that would work on 2021 data. But would massivly fail in 2022. But in 2021 literally anything worked. So the market sentiment is really important. I think we might see a bear year soon sadly.
>>61237652you're trading crypto options?
>>61237652anyway, algo trading is hard and what works now, might not work next year.
>>61237658Like I said, I don't really plan on giving too many specifics, I'm just saying there is a world beyond directional strategies where you can do many many trades and make some money (may not be as much you would expect unless you're really good at it and if you're bad at it a software bug deletes all your money lol).
>>61237455what markets are you trading? I assume some kind of MM or arbitrage?
>>61235886I think he meant adding the discord code to the thread bake
I wanted to write something longer, but I’ll just make it short and to the point. If you think you are “algotrading” as retail against jump and other actors, you simply are embodiment of dunning Kruger. And if you think your little backrest guarantees you 200% apy, you’re actually just a complete fucking retard. Anyone worth their salt knows when they see numbers like this that their model is wrong, look ahead biased,has unaccounted risk factors or costs, is practically impossible because it requires fitting a computational intensive model on second level data or all of the above.
>>61236748books wont help either if most people will use tradingview or metatrader to "develop" their strats.>>61236519fees, slippage and potentially running it front to back, from current price into past, not vice versa - that way your model unknown to you had a knowledge of the future price, other conditions or trade position to feed in which could skew the real results
>>61238047>I wanted to write something longer, but I’ll just make it short and to the point. If you think you are “algotrading” as retail against jump and other actors, you simply are embodiment of dunning Kruger.Such a stupid post, do you even know what capacity is? There’s so many reason this mindset is wrong.
>>61238047I literally had 200% gains with one trade in the past, why wouldn't you be able to do that in a year?
>>61238643He’s just being an EMH brainlet doomer
i did it. i created a strategy that is about equal to buy-and-hold
We've all heard of delta neutral, but have you heard of
>algo loses money>i reverse it>algo still loses money im going to reverse it again
>>61240038You're making this mistake >>61237090
>>61227876is that the legend who founded the millenium fund?