SShortSingh.
Back to feed

How to build stock chart pattern search without the silent failure modes

0
·1 views

Finding historical chart patterns that resemble a current stock's shape is a common feature request, but naive implementations produce misleading results because raw price levels and scale dominate the similarity metric rather than actual shape. The fix involves z-normalizing each candidate window independently before comparison, which also reveals that z-normalized Euclidean distance and Pearson correlation produce identical rankings. Using log returns instead of raw prices is recommended since prices are non-stationary, meaning their variance shifts over time. Window length is another critical variable — short windows capture noise while very long windows are nearly unique, making genuine matches rare. The article stops short of claiming predictive value for any matched patterns, treating the method purely as a retrieval and visualization tool.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Open LLM Gateway offers self-hosted, Apache 2.0 LLM control plane with no user cap

A developer has released Open LLM Gateway, a fully open-source, self-hostable LLM control plane licensed under Apache 2.0, after finding existing tools like LiteLLM imposed seat-based licensing restrictions beyond five users. The project was born out of a real operational problem: teams using multiple LLM providers across Google, Azure, and AWS had no unified way to track API key ownership, token usage, or per-product spending. The gateway supports proxying for OpenAI and Anthropic APIs, encrypted key management, cost and token analytics, and an admin portal with role-based access and optional Google login. It is deployable on Cloudflare Workers and Vercel, with the full admin UI included in the open-source release — not just the proxy layer. The project is positioned for organizations that need a self-hosted LLM gateway without enterprise licensing walls, though features like spend limits and guardrails are not yet available.

0
ProgrammingDEV Community ·

Developer builds browser-only PDF compressor that never uploads your files

A developer added a client-side PDF compression tool to ToolHub, designed so that no file data ever leaves the user's browser. Each PDF page is rendered as an image using a pdf.js pipeline, recompressed via a canvas-based quality slider, and reassembled into a new PDF using pdf-lib. Testing on a 4.7MB image-heavy PDF achieved a 72% size reduction, with output verified using pypdf to confirm image integrity. The approach comes with a noted tradeoff: because pages are converted to images, text in the compressed output is no longer selectable or searchable. The tool is recommended for image-heavy or scanned PDFs and openly discloses this limitation to users upfront.

0
ProgrammingDEV Community ·

Google's TimesFM 3.0 Offers Zero-Shot Time Series Forecasting Without Training

Google Research has released TimesFM 3.0, a pretrained foundation model that forecasts time series data without requiring any model training or hyperparameter tuning by developers. Built on a decoder-only transformer architecture similar to GPT, the model processes time series data in 32-step patches rather than individual points, making it efficient over long histories. It was pretrained on over a trillion time points spanning retail, finance, web traffic, and energy sectors, enabling zero-shot forecasting across unseen datasets. The model natively outputs nine quantile estimates at every forecast step, providing built-in prediction intervals without additional configuration. Developers can install and use TimesFM via a simple pip command, passing raw NumPy arrays to receive forecasts, including the latest improvements introduced in the August 2026 version 3.0 release.

0
ProgrammingDEV Community ·

Talent Is Pattern Recognition, Not Memory Capacity, Argues DEV Community Post

A widely discussed piece on DEV Community argues that memory and talent are fundamentally different cognitive abilities, with memory serving merely as storage while talent involves recognizing patterns, building abstractions, and transferring knowledge across domains. The article uses a graph analogy to explain that a truly skilled thinker has fewer but better-connected ideas, rather than many isolated facts. It draws a parallel to machine learning, noting that models — and people — who only memorize training data tend to fail when faced with unfamiliar problems, a phenomenon known as poor generalization. The author contends that real-world problem-solving demands the ability to map new inputs to underlying principles, not just retrieve cached answers. Ultimately, the piece concludes that the ability to discover connections between ideas, not the volume of information retained, is the stronger indicator of mastery.

How to build stock chart pattern search without the silent failure modes · ShortSingh