frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

I wrote a Rust engine to backtest crypto candlestick patterns

https://piotrwilczek.com/crypto-patterns/
4•piotrwilczek•5h ago

Comments

piotrwilczek•5h ago
Hey HN,

As an algorithmic trader, I spend most of my time looking for quantifiable edges in the market. This time (a bit for fun) I wanted to check classic candlestick patterns that manual traders use—things like the "Morning star" or "Three White Soldiers." Is there any real, statistical "alpha" to be found in them?

To find out, I built a tool to rigorously backtest these patterns at scale. This project is a high-performance analysis engine that searches for these patterns across years of 1-hour Binance Futures data and measures their historical profitability.

What made this project especially interesting for me is that it was my first real project in Rust. I was able to build it much faster than I ever expected, largely because I used Cursor. Having an AI assistant that could explain Rust's concepts directly in my IDE was a complete game-changer. It felt like pair programming and dramatically shortened the learning curve.

The link goes to a static HTML report generated by the tool, summarizing the performance of various patterns.

A few technical details:

* Tech Stack: It's built in Rust using Tokio for parallelism when analyzing symbols, and serde/csv for data handling. The frontend is plain HTML/JS with static Tailwind CSS and ECharts.js for the interactive charts.

* The "How": The core challenge is comparing patterns that occur at wildly different price levels and volatility. To solve this, the matching logic uses Z-Score Normalization on rolling windows of data. This allows for a true "shape-based" comparison. It then uses a KNN-style search with a binary heap to efficiently find the top N closest matches without having to store them all in memory.

* The Data: ~8 MLN 1-hour candles from all Binance Futures symbols (~490) including delisted ones to avoid survivorship bias.

Of course, this is not financial advice, and past performance is not an indicator of future results. The goal was to explore a specific dataset for historical statistical edges.

I'd love to hear your thoughts, critiques, or any questions you might have. Happy to discuss the technical implementation or the results.

Artist Corporations

https://www.artistcorporations.com/
1•oatsandsugar•19s ago•0 comments

Monte Carlo Sandwich Open-Faced Turkey and Ham [pdf]

https://quartermaster.army.mil/jccoe/publications/recipes/section_n/N03100.pdf
3•Bluestein•1m ago•0 comments

Normalizing Flows Are Capable Generative Models

https://machinelearning.apple.com/research/normalizing-flows
3•danboarder•4m ago•0 comments

Conferences, Clarity, and Smokescreens

https://infrequently.org/2025/06/conferences-clarity-and-smokescreens/
2•tempodox•4m ago•0 comments

A Guide to Failure in Machine Learning

https://arxiv.org/abs/2503.00563
2•belter•5m ago•0 comments

Show HN: LLM Prompt Diff – Semantic Git-Style Diffing for AI Prompts

https://github.com/aatakansalar/llm-prompt-semantic-diff
3•aatakansalar•9m ago•0 comments

Show HN: StrateQueue- Bridge backtest and live trading with microsecond latency

https://github.com/StrateQueue/StrateQueue
1•SamTinnerholm•10m ago•0 comments

Show HN: I built a RAG APIs that works like Stripe Checkout

https://liquidindex.dev/
1•KaKandikonda76•10m ago•1 comments

The Manchester Compiler Compiler and CPL: reflections of a user 50 years on [pdf]

https://curation.cs.manchester.ac.uk/atlas/docs/CC_Reflections-v4%20final.pdf
1•fanf2•12m ago•0 comments

Supreme Court Rejects Challenge to FCC Broadband Subsidy Program

https://www.nbcnews.com/politics/supreme-court/supreme-court-upholds-phone-internet-subsidy-program-underserved-areas-rcna202662
1•m463•12m ago•0 comments

NASA's Future SLS Booster Failed Its First Test [video]

https://www.youtube.com/watch?v=F85bTJLdaTo
6•perihelions•14m ago•0 comments

Android phones could soon warn you of "Stingrays" snooping on your communicatio

https://arstechnica.com/gadgets/2025/06/future-android-phones-could-warn-you-about-data-stealing-fake-cell-towers/
14•todsacerdoti•14m ago•0 comments

US Supreme Court backs Texas online porn age-check law

https://www.reuters.com/legal/government/us-supreme-court-poised-rule-challenge-texas-age-check-online-porn-2025-06-27/
1•PessimalDecimal•15m ago•0 comments

From code reuse to the impact of generative AI

https://lemire.me/blog/2025/06/27/from-code-reuse-to-the-impact-of-generative-ai/
1•ibobev•17m ago•0 comments

Learn OCaml – Exercises

https://ocaml-sf.org/learn-ocaml-public/#activity=exercises
2•smartmic•17m ago•0 comments

Deep in Copy Constructor: The Heart of C++ Value Semantics

https://www.gizvault.com/archives/deep-in-copy-constructor
4•ricecat•18m ago•0 comments

Largest in-person AV conversational dataset ever released

https://huggingface.co/datasets/facebook/seamless-interaction
1•peloqube•18m ago•0 comments

Tech CEO Pays $400k to Conduct the Toronto Symphony

https://www.nytimes.com/2025/06/27/arts/music/mandle-cheung-toronto-symphony-mahler.html
3•perihelions•19m ago•0 comments

AI Age Shopify For Online Shopping Website

https://www.selltosky.com
1•liurenju•20m ago•1 comments

Gemini CLI

https://github.com/google-gemini/gemini-cli
1•RyanShook•21m ago•0 comments

Obeying orders dulls our sense of moral responsibility, brain scans reveal

https://medicalxpress.com/news/2025-06-obeying-dulls-moral-responsibility-brain.html
2•PaulHoule•21m ago•0 comments

Navy SEALs, Performance vs. Trust, and AI

https://mljar.com/blog/navy-seals-performance-vs-trust-and-ai/
2•pplonski86•22m ago•0 comments

Shadowology Collection part 3 [2022 video]

https://www.youtube.com/watch?v=7aytzT0qwJI
1•Stratoscope•22m ago•0 comments

Unsupervised pretraining in biological neural networks

https://www.nature.com/articles/s41586-025-09180-y
1•domofutu•22m ago•0 comments

World Bank: Fragile states falling further behind as conflicts grow get deadlier

https://www.independent.co.uk/news/world-bank-people-washington-life-expectancy-covid-b2778531.html
1•Bluestein•26m ago•0 comments

The Circuit Board Club

https://circuitboard.club
1•radeeyate•26m ago•0 comments

[DELETED]

https://files.catbox.moe/omq94l.PNG
1•lihaciudaniel•26m ago•0 comments

Non-Transactional, Positive-Sum, and Multi-Turn

https://feld.com/archives/2025/06/non-transactional-positive-sum-and-multi-turn/
1•rmason•27m ago•0 comments

Show HN: I built an AI app that counts the number of R's in strawberrrrry

https://claude.ai/public/artifacts/3bf549ca-85d7-4c5f-bdee-4bee4a7bbdbf
1•thngkaiyuan•28m ago•0 comments

Brazil Supreme Court rules digital platforms are liable for users' posts

https://www.ft.com/content/4a5235c5-acd0-4e81-9d44-2362a25c8eb3
7•dmitrygr•30m ago•0 comments