{"format":"alysly-page/1","url":"https://alysly.com/learn/sample-weights/","json":"https://alysly.com/json/learn/sample-weights/index.json","lang":"en-US","title":"Sample Weights in Financial ML: Uniqueness and Overlap","description":"Why overlapping labels break the independence assumption and how uniqueness, sample weights and time decay correct for it.","published":"2026-08-02T15:54:51+02:00","modified":"2026-11-04T09:15:31+01:00","alternates":[{"lang":"de-DE","url":"https://alysly.com/de/lernen/stichprobengewichte/","json":"https://alysly.com/json/de/lernen/stichprobengewichte/index.json"}],"about":"Machine-readable version of the page at url. It contains the text, tables and key figures published there, but not the interactive charts and tools.","breadcrumb":[{"name":"Investing & Trading Basics","url":"https://alysly.com/learn/"},{"name":"Level 3","url":"https://alysly.com/learn/#level-3"},{"name":"Overlapping Examples and Sample Weights","url":"https://alysly.com/learn/sample-weights/"}],"content":[{"type":"paragraph","text":"Level 3 AI in Trading · Part 6/9"},{"type":"heading","level":1,"text":"Overlapping Examples and Sample Weights"},{"type":"paragraph","text":"By Alexander Bock, founder and data analyst","links":[{"text":"Alexander Bock","href":"https://alysly.com/about/"}]},{"type":"paragraph","text":"Almost every standard machine learning method assumes that training examples are drawn independently. On financial data, that assumption is nowhere near met, and the problem is not small but dominant."},{"type":"heading","level":2,"id":"where-the-dependence-comes-from","text":"Where the Dependence Comes From"},{"type":"paragraph","text":"If a label covers the next ten periods, two neighboring examples share nine of those ten. Their outcomes are driven by largely the same price moves."},{"type":"paragraph","text":"To a model that looks like confirmation: the same relationship, again and again. In reality it is one observation entered ten times. The effective sample size is therefore far smaller than the number of rows. Any confidence statement based on the row count is correspondingly too narrow."},{"type":"heading","level":2,"id":"uniqueness","text":"Uniqueness"},{"type":"paragraph","text":"The fix starts with a measurement. For each point in time, count how many labels cover it at the same time. An example whose outcome window overlaps many others is barely unique; one that stands alone is fully unique."},{"type":"image","src":"https://alysly.com/img/ta/label-overlap.0dffb63f5772f88f5b91dee391c39d1e6310b466ff957617f5ad33d27c524ec8.webp","alt":"Overlapping label windows on a timeline and the observation weights that follow from them"},{"type":"paragraph","text":"Each bar at the top is the window over which one label is formed — ten days here. (1) The front windows overlap heavily: they describe largely the same price moves. To a model they still look like independent observations — that is the assumption breaking. (2) Below each observation is its uniqueness: the share of its window no other window touches. For the two middle ones it is zero — they are fully covered by their neighbors and add nothing of their own. (3) Free-standing windows get the full weight. These values serve as sample weights so that tightly packed observations do not count like many independent ones."},{"type":"paragraph","text":"The average uniqueness across its window gives every example a weight. During training, examples with heavy overlap then count for less. The change is small but important: the model stops mistaking repetition for evidence."},{"type":"heading","level":2,"id":"weighting-by-the-size-of-the-outcome","text":"Weighting by the Size of the Outcome"},{"type":"paragraph","text":"A second, independent weighting: examples whose move was large carry more information than examples that barely cleared the noise. A common choice is to weight by the absolute return over the outcome window, divided by the number of labels running at the same time."},{"type":"paragraph","text":"Taken together, uniqueness and size bring the training closer to what matters economically."},{"type":"heading","level":2,"id":"time-decay","text":"Time Decay"},{"type":"paragraph","text":"Markets change. A relationship from 2011 is not wrong, but it is probably less relevant than one from last year. A time weight that decays linearly or exponentially accounts for that."},{"type":"paragraph","text":"The setting is a trade-off, not an optimization problem. Strong decay makes the model adaptive and unstable; weak decay makes it stable and slow. What matters is only that you make the decision deliberately and do not tune it on the test data. That would be the next way to burn through it."},{"type":"heading","level":2,"id":"sequential-bootstrap","text":"Sequential Bootstrap"},{"type":"paragraph","text":"Bagging methods such as random forests draw training examples at random with replacement. With overlapping data, almost identical examples land in the same draw, and the trees of a forest become more similar than intended. The whole advantage of the ensemble shrinks."},{"type":"paragraph","text":"The sequential bootstrap corrects this: the probability of drawing an example falls once an overlapping example has already been drawn. The result is draws with considerably higher average uniqueness, and ensembles whose members really do differ."},{"type":"heading","level":2,"id":"the-practical-core","text":"The Practical Core"},{"type":"paragraph","text":"All three corrections do the same thing: they stop repetition from being counted as confirmation. That is the same error Level 2 describes for small samples — here written down formally and made measurable.","links":[{"text":"Level 2","href":"https://alysly.com/learn/testing-a-pattern/"}]},{"type":"heading","level":2,"id":"next","text":"Next"},{"type":"paragraph","text":"The same overlap also ruins validation. How to repair it is the next article."},{"type":"list","ordered":false,"items":[{"text":"Previous Labels: Triple Barrier and Meta-Labeling","href":"https://alysly.com/learn/labeling/"},{"text":"Next Cross-Validation Without Leakage","href":"https://alysly.com/learn/cross-validation/"}]},{"type":"heading","level":2,"text":"Indices"},{"type":"table","caption":"Indices, performance over the selected period","columns":["Index","1M"],"rows":[[{"text":"Dow Jones","href":"https://alysly.com/markets/indices/dow-jones/"},{"text":"+1.2%","data":{"m1":"+1.2%","m3":"-2.9%","m6":"+4.3%","ytd":"+8.7%","max":"+31.4%"}}],[{"text":"S&P 500","href":"https://alysly.com/markets/indices/sp500/"},{"text":"-2.7%","data":{"m1":"-2.7%","m3":"-2.7%","m6":"+1.2%","ytd":"+11.0%","max":"+36.1%"}}],[{"text":"MSCI World","href":"https://alysly.com/markets/indices/msci-world/"},{"text":"-1.9%","data":{"m1":"-1.9%","m3":"-3.0%","m6":"+1.2%","ytd":"+10.4%","max":"+35.6%"}}],[{"text":"MSCI ACWI","href":"https://alysly.com/markets/indices/msci-acwi/"},{"text":"-2.6%","data":{"m1":"-2.6%","m3":"-3.7%","m6":"-0.1%","ytd":"+10.6%","max":"+42.1%"}}]]},{"type":"heading","level":2,"text":"ETFs"},{"type":"table","caption":"ETFs, performance over the selected period","columns":["Fund","1M"],"rows":[[{"text":"SPDR S&P 500 ETF Trust SPY","links":[{"text":"SPDR S&P 500 ETF Trust","href":"https://alysly.com/markets/etfs/us/spy/"}]},{"text":"-2.7%","data":{"m1":"-2.7%","m3":"-2.7%","m6":"+1.2%","ytd":"+11.0%","max":"+36.1%"}}],[{"text":"Vanguard S&P 500 ETF VOO","links":[{"text":"Vanguard S&P 500 ETF","href":"https://alysly.com/markets/etfs/us/voo/"}]},{"text":"-2.7%","data":{"m1":"-2.7%","m3":"-2.7%","m6":"+1.2%","ytd":"+11.0%","max":"+34.5%"}}],[{"text":"iShares Core MSCI World UCITS ETF USD (Acc) EUNL","links":[{"text":"iShares Core MSCI World UCITS ETF USD (Acc)","href":"https://alysly.com/markets/etfs/ishares-core-msci-world-ucits-etf-usd-acc/"}]},{"text":"-1.8%","data":{"m1":"-1.8%","m3":"-3.0%","m6":"+1.9%","ytd":"+11.1%","max":"+490.2%"}}],[{"text":"Xtrackers MSCI Emerging Markets UCITS ETF 1c XMME","links":[{"text":"Xtrackers MSCI Emerging Markets UCITS ETF 1c","href":"https://alysly.com/markets/etfs/xtrackers-msci-emerging-markets-ucits-etf-1c/"}]},{"text":"-6.3%","data":{"m1":"-6.3%","m3":"-7.8%","m6":"-8.3%","ytd":"+12.6%","max":"+90.7%"}}]]},{"type":"heading","level":2,"text":"Stocks"},{"type":"table","caption":"Stocks, performance over the selected period","columns":["Stock","1M"],"rows":[[{"text":"NVIDIA Corporation NVDA","links":[{"text":"NVIDIA Corporation","href":"https://alysly.com/markets/stocks/nvidia-corporation/"},{"text":"United States","href":"https://alysly.com/markets/stocks/browse/?country=United%20States"}]},{"text":"-27.3%","data":{"m1":"-27.3%","m3":"-26.2%","m6":"-29.5%","ytd":"-10.9%","max":"+30.4%"}}],[{"text":"Apple Inc. AAPL","links":[{"text":"Apple Inc.","href":"https://alysly.com/markets/stocks/apple-inc/"},{"text":"United States","href":"https://alysly.com/markets/stocks/browse/?country=United%20States"}]},{"text":"+4.0%","data":{"m1":"+4.0%","m3":"+16.3%","m6":"+19.0%","ytd":"+30.5%","max":"+55.9%"}}],[{"text":"Tesla Inc. TSLA","links":[{"text":"Tesla Inc.","href":"https://alysly.com/markets/stocks/tesla-inc/"},{"text":"United States","href":"https://alysly.com/markets/stocks/browse/?country=United%20States"}]},{"text":"+5.9%","data":{"m1":"+5.9%","m3":"+16.9%","m6":"-10.3%","ytd":"-11.6%","max":"+64.9%"}}]]},{"type":"paragraph","text":"Data note 1","href":"#dn-1"},{"type":"heading","level":2,"text":"More Research"},{"type":"list","ordered":false,"items":[{"text":"May 19, 2026 Crypto 45.6% Bitcoin’s annualized volatility, Jul 2024 — Sep 2026 Bitcoin in Investment Portfolios: The Real Numbers Bitcoin is calmer than it was and still about three times as volatile as the stock market. It moves with stocks, not with gold.","href":"https://alysly.com/research/bitcoin-investment-portfolios/"},{"text":"Oct 14, 2025 Trading +227.8% the market itself, 2017–2026, no trading Why Most Traders Lose Money: What the Data Shows The market paid 13.5% a year. Five measurable forces decide how much of that a trader keeps, and at ordinary trading frequencies it is very little.","href":"https://alysly.com/research/why-most-traders-lose-money/"},{"text":"Nov 12, 2026 Wealth €57.50 is what €100 from August 1999 buys in August 2026 Paper Money and Inflation: What €100 From 1999 Is Worth Today Since 1999, prices in Germany have risen by just over 2% a year on average. That sounds small. Over 27 years, though, the euro has lost 42.5% of its purchasing power.","href":"https://alysly.com/research/paper-money-and-inflation/"}]},{"type":"paragraph","text":"View all research","href":"https://alysly.com/research/"},{"type":"heading","level":2,"text":"Learn"},{"type":"list","ordered":false,"items":[{"text":"Cross-Validation Without Leakage Why k-fold leaks on price data — purging, embargo, CPCV.","href":"https://alysly.com/learn/cross-validation/"},{"text":"Backtest Overfitting: The Number of Trials Counts The best of 50 trials always looks good — how to correct for it.","href":"https://alysly.com/learn/backtest-overfitting/"}]},{"type":"paragraph","text":"Course overview","href":"https://alysly.com/learn/"},{"type":"paragraph","text":"Published Aug 2, 2026 · Updated Nov 4, 2026 · Data checked automatically Nov 13, 2026"},{"type":"heading","level":2,"id":"note-legend-h","text":"Data Notes"},{"type":"paragraph","text":"All calculations run automatically and are not investment advice."},{"type":"list","ordered":true,"items":[{"id":"dn-1","text":"Returns computed automatically from the price series, excluding dividends, taxes and costs."}]},{"type":"paragraph","text":"Data and methodology: Alysly · Responsible for content: Alexander Bock","links":[{"text":"Alysly","href":"https://alysly.com/methodology/"},{"text":"Alexander Bock","href":"https://alysly.com/about/"}]},{"type":"paragraph","text":"View all data notes","href":"https://alysly.com/notes/"}],"structured_data":[{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://alysly.com/#org","name":"Alysly","url":"https://alysly.com/","logo":{"@type":"ImageObject","url":"https://alysly.com/img/icon-512.png","width":512,"height":512},"description":"Free analysis tools for traders and long-term investors. Built on data we collect and keep current.","email":"mail@alysly.com","contactPoint":{"@type":"ContactPoint","contactType":"customer support","email":"mail@alysly.com","availableLanguage":["de","en"]},"address":{"@type":"PostalAddress","addressLocality":"Haltern am See","postalCode":"45721","addressCountry":"DE"},"founder":{"@id":"https://alysly.com/#founder"},"sameAs":["https://www.linkedin.com/company/alyslycom/","https://www.youtube.com/@alyslycom","https://x.com/alyslycom"],"publishingPrinciples":"https://alysly.com/methodology/","correctionsPolicy":"https://alysly.com/corrections/"},{"@type":"Person","@id":"https://alysly.com/#founder","name":"Alexander Bock","jobTitle":"Founder and data analyst","url":"https://alysly.com/about/","sameAs":["https://www.linkedin.com/in/abxk/"]},{"@type":"WebSite","@id":"https://alysly.com/#site","url":"https://alysly.com/","name":"Alysly","inLanguage":["de-DE","en-US"],"publisher":{"@id":"https://alysly.com/#org"}},{"@type":"WebPage","@id":"https://alysly.com/learn/sample-weights/#webpage","url":"https://alysly.com/learn/sample-weights/","name":"Overlapping Examples and Sample Weights – Alysly","description":"Why overlapping labels break the independence assumption and how uniqueness, sample weights and time decay correct for it.","inLanguage":"en-US","isPartOf":{"@id":"https://alysly.com/#site"},"dateModified":"2026-11-04T09:15:31+01:00","publisher":{"@id":"https://alysly.com/#org"},"mainEntity":{"@id":"https://alysly.com/learn/sample-weights/#entity"},"primaryImageOfPage":{"@type":"ImageObject","url":"https://alysly.com/img/ta/label-overlap-og.10d4b1ede4c67813293abe182f298e5e499562086591b7a09fc053eb7011ab53.png","width":1200,"height":630}}]},{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Investing & Trading Basics","item":"https://alysly.com/learn/"},{"@type":"ListItem","position":2,"name":"Overlapping Examples and Sample Weights"}]},{"@context":"https://schema.org","@type":"Article","@id":"https://alysly.com/learn/sample-weights/#entity","headline":"Overlapping Examples and Sample Weights","description":"Why overlapping labels break the independence assumption and how uniqueness, sample weights and time decay correct for it.","inLanguage":"en-US","mainEntityOfPage":"https://alysly.com/learn/sample-weights/","image":[{"@type":"ImageObject","height":630,"url":"https://alysly.com/img/ta/label-overlap-og.10d4b1ede4c67813293abe182f298e5e499562086591b7a09fc053eb7011ab53.png","width":1200},{"@type":"ImageObject","height":600,"url":"https://alysly.com/img/ta/label-overlap.0dffb63f5772f88f5b91dee391c39d1e6310b466ff957617f5ad33d27c524ec8.webp","width":1280}],"isPartOf":{"@type":"CreativeWorkSeries","name":"Investing & Trading Basics","url":"https://alysly.com/learn/"},"educationalLevel":"Level 3","author":{"@id":"https://alysly.com/#founder"},"publisher":{"@id":"https://alysly.com/#org"},"datePublished":"2026-08-02T15:54:51+02:00","dateModified":"2026-11-04T09:15:31+01:00"}],"notice":"© 2026 Alysly.com"}