backtest-kit-docs / documents /concept_02_zero_expectation_escape.html
tripolskypetr's picture
patch
d99335f
Raw
History Blame Contribute Delete
27 kB
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>concept/02_zero_expectation_escape | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="concept_02_zero_expectation_escape.html">concept/02_zero_expectation_escape</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="๐Ÿ’ธ-escaping-zero-expectation-from-a-fixed-sum-game-to-a-growing-sum-game" class="tsd-anchor"></a><h1 class="tsd-anchor-link">๐Ÿ’ธ Escaping zero expectation: from a fixed-sum game to a growing-sum game<a href="#๐Ÿ’ธ-escaping-zero-expectation-from-a-fixed-sum-game-to-a-growing-sum-game" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><blockquote>
<p>The source code discussed in the article is published <a href="https://github.com/backtest-kit/backtest-ollama-crontab">in this repository</a>.</p>
</blockquote>
<p><img src="../media/cover_zero_expectation_escape.jpg" alt="cover_zero_expectation_escape"></p>
<p>Any trading strategy, on an infinite time horizon, tends toward zero expected value per trade: you earned nothing, you paid the exchange a commission. One might assume this is due to information leakage, that the strategy is being used by other market participants and they take the liquidity. But the reason is different: it is the fundamental law of large numbers. Market volume is forecastable, which means it is a finite sum. In a game with a finite sum the capital on the market is constant and only migrates between participants: your earnings are someone's losses.</p>
<p><img src="../media/luxalgo_plateau.png" alt="luxalgo_plateau"></p>
<p>Look at the chart: portfolio return growth first increases, then runs into a plateau without any pronounced upward or downward movement. The nearest analogy: an object thrown upward, when acceleration and gravity balance out, stops at a point and then falls back down.</p>
<a id="a-game-with-a-finite-sum" class="tsd-anchor"></a><h2 class="tsd-anchor-link">A game with a finite sum<a href="#a-game-with-a-finite-sum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Any effective quant strategy is an exploit of a market inefficiency. As soon as everyone uses the exploit โ€” the inefficiency disappears, because what created it in the first place was precisely the fact that <strong>nobody was arbitraging it</strong>. The market comes into equilibrium. And equilibrium for a participant means a simple thing: the mathematical expectation of a trade becomes <strong>zero minus exchange commission</strong>. Not &quot;a small profit&quot;, but a strictly negative number.</p>
<a id="escape-into-a-game-with-a-growing-sum" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Escape into a game with a growing sum<a href="#escape-into-a-game-with-a-growing-sum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>There is only one way out of this trap: look at what brings money into the system from the outside, rather than redistributing what is already there. One might think this is the accounting reports of companies or funds, but no: the publication of accounting data does not guarantee deterministic behavior of market participants. Mathematically, the guarantee of a growing-sum game is a direct recommendation to the public, if its size tends to infinity.</p>
<a id="piggybacking-to-paradise" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Piggybacking to paradise<a href="#piggybacking-to-paradise" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Earlier I covered <a href="article_08_ai_liquidity_harvesting.html">the stop hunting pattern for liquidity harvesting</a>: market participants get a post with panic sentiment published to them to trigger mass selling, and as a consequence the asset can be bought up all at once for cheaper. But you can also make money on euphoria.</p>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total trades</td>
<td>22</td>
</tr>
<tr>
<td>Wins / Losses</td>
<td>15 / 7</td>
</tr>
<tr>
<td>Winrate</td>
<td><strong>68%</strong></td>
</tr>
<tr>
<td>Mean trade PNL</td>
<td><strong>+2.374%</strong></td>
</tr>
<tr>
<td>Std dev per trade</td>
<td>7.676%</td>
</tr>
<tr>
<td>Sharpe Ratio (per-trade)</td>
<td><strong>+0.302</strong></td>
</tr>
</tbody>
</table>
<p>A Telegram channel publishes signals, they are successful in 68% of cases. The average retail investor will not look any further. And this is a trap: risk management does not insure against the black swan scenario at all.</p>
<p>Risks:</p>
<ol>
<li>
<p><strong>High volatility relative to average profit</strong></p>
<p>The average trade is +2.37%, but the standard deviation is <strong>ยฑ7.86%</strong>. One or two strong losses easily eat up the profit of ten small wins, while the winrate still looks &quot;pretty&quot;.</p>
</li>
<li>
<p><strong>Low Sharpe = weak risk compensation</strong></p>
<p>Sharpe 0.3 indicates that the profit is not large enough compared to the risk being taken. Good trading aims for Sharpe &gt; 1.0.</p>
</li>
</ol>
<p>This is a different pattern of crowd liquidity usage: <code>pump and dump</code>. Let us verify the hypothesis by picking only those signals where the asset's price had already been rising over the previous N hours.</p>
<table>
<thead>
<tr>
<th>Metric</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Total trades</td>
<td>11</td>
</tr>
<tr>
<td>Wins / Losses</td>
<td>11 / 0</td>
</tr>
<tr>
<td>Winrate</td>
<td>100%</td>
</tr>
<tr>
<td>Mean trade PNL</td>
<td>+6.972%</td>
</tr>
<tr>
<td>Std dev per trade</td>
<td>8.642%</td>
</tr>
<tr>
<td>Sharpe Ratio (per-trade)</td>
<td>+0.807</td>
</tr>
</tbody>
</table>
<p>What improved:</p>
<ol>
<li>
<p><strong>Sharpe Ratio grew 2.67x</strong> (0.302 โ†’ 0.807)</p>
<p>Profit now compensates the assumed risk much better.</p>
</li>
<li>
<p><strong>The average trade became almost 3x more profitable</strong> (+2.37% โ†’ +6.97%)</p>
<p>Portfolio drawdowns went away: fewer losing trades.</p>
</li>
</ol>
<p>The price growth over the last N hours is an empirical criterion. I knew where to look in advance, but I did not perform an analysis of the matrix of recommendation posts. <strong>If you take the top 100 channels, using publication time and recommendation direction you can identify a single author</strong> behind several anonymous accounts. Further, with the link to a single author, you can find out how many more channels he is potentially capable of using to continue the pump.</p>
<a id="how-to-make-money-on-this" class="tsd-anchor"></a><h2 class="tsd-anchor-link">How to make money on this<a href="#how-to-make-money-on-this" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Using a <a href="article_05_ai_strategy_workflow.html">self enforcement runtime</a>, a parser and a <a href="concept_01_monorepo_parallel_execution.html">high-performance backtest</a> one can update the empirical entry criteria automatically. The channel parser extracts the direction, entry zone, targets and stop from the text with simple regex rules:</p>
<pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">SIGNAL_FORMAT</span><span class="hl-2">: </span><span class="hl-10">ParseFormat</span><span class="hl-2">&lt;</span><span class="hl-10">SignalFields</span><span class="hl-2">&gt; = {</span><br/><span class="hl-2"> </span><span class="hl-5">symbol:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">pattern:</span><span class="hl-17"> /#</span><span class="hl-18">([</span><span class="hl-17">A-Z0-9</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-18">)</span><span class="hl-13">\/</span><span class="hl-17">USDT/</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">group:</span><span class="hl-2"> </span><span class="hl-8">1</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">direction:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">pattern:</span><span class="hl-17"> /</span><span class="hl-18">(</span><span class="hl-17">ะจะžะ ะข</span><span class="hl-20">|</span><span class="hl-17">ะ›ะžะะ“</span><span class="hl-18">)</span><span class="hl-17">/</span><span class="hl-4">i</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">transform</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">raw</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> (</span><span class="hl-5">raw</span><span class="hl-2">.</span><span class="hl-1">toUpperCase</span><span class="hl-2">() === </span><span class="hl-3">&quot;ะจะžะ ะข&quot;</span><span class="hl-2"> ? </span><span class="hl-3">&quot;short&quot;</span><span class="hl-2"> : </span><span class="hl-3">&quot;long&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">entry:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">pattern:</span><span class="hl-17"> /ะทะพะฝะต\s</span><span class="hl-19">+</span><span class="hl-13">\$</span><span class="hl-19">?</span><span class="hl-18">([</span><span class="hl-17">\d.,</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-18">)</span><span class="hl-17">\s</span><span class="hl-19">*</span><span class="hl-18">[</span><span class="hl-17">-โ€“โ€”</span><span class="hl-18">]</span><span class="hl-17">\s</span><span class="hl-19">*</span><span class="hl-18">(?:</span><span class="hl-13">\$</span><span class="hl-19">?</span><span class="hl-18">[</span><span class="hl-17">\d.,</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-17">\s</span><span class="hl-19">*</span><span class="hl-18">[</span><span class="hl-17">-โ€“โ€”</span><span class="hl-18">]</span><span class="hl-17">\s</span><span class="hl-19">*</span><span class="hl-18">)</span><span class="hl-19">?</span><span class="hl-13">\$</span><span class="hl-19">?</span><span class="hl-18">([</span><span class="hl-17">\d.,</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-18">)(?=</span><span class="hl-17">\s</span><span class="hl-18">)</span><span class="hl-17">/</span><span class="hl-4">i</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">transform</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">_</span><span class="hl-2">, </span><span class="hl-5">m</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> ({ </span><span class="hl-5">from:</span><span class="hl-2"> </span><span class="hl-1">num</span><span class="hl-2">(</span><span class="hl-5">m</span><span class="hl-2">[</span><span class="hl-8">1</span><span class="hl-2">]), </span><span class="hl-5">to:</span><span class="hl-2"> </span><span class="hl-1">num</span><span class="hl-2">(</span><span class="hl-5">m</span><span class="hl-2">[</span><span class="hl-8">2</span><span class="hl-2">]) }),</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">targets:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">pattern:</span><span class="hl-17"> /ะ—ะฐะบั€ั‹ั‚ัŒ</span><span class="hl-18">(?:</span><span class="hl-17">\s</span><span class="hl-19">+</span><span class="hl-17">ะพั€ะดะตั€</span><span class="hl-18">)</span><span class="hl-19">?</span><span class="hl-17">\s</span><span class="hl-19">+</span><span class="hl-17">ะฟะพ</span><span class="hl-18">(?:</span><span class="hl-17">\s</span><span class="hl-19">+</span><span class="hl-17">ั†ะตะฝะต</span><span class="hl-18">)</span><span class="hl-19">?</span><span class="hl-17">\s</span><span class="hl-19">+</span><span class="hl-13">\$</span><span class="hl-19">?</span><span class="hl-18">([</span><span class="hl-17">\d.,</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-18">)</span><span class="hl-17">/</span><span class="hl-4">gi</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">transform</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">_</span><span class="hl-2">, </span><span class="hl-5">m</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-1">num</span><span class="hl-2">(</span><span class="hl-5">m</span><span class="hl-2">[</span><span class="hl-8">1</span><span class="hl-2">]),</span><br/><span class="hl-2"> </span><span class="hl-5">multi:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">stoploss:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">pattern:</span><span class="hl-17"> /ะกะขะžะŸ-</span><span class="hl-19">?</span><span class="hl-17">ะ›ะžะกะก:\s</span><span class="hl-19">*</span><span class="hl-13">\$</span><span class="hl-19">?</span><span class="hl-18">([</span><span class="hl-17">\d.,</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-18">)</span><span class="hl-17">/</span><span class="hl-4">i</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">transform</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">_</span><span class="hl-2">, </span><span class="hl-5">m</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-1">num</span><span class="hl-2">(</span><span class="hl-5">m</span><span class="hl-2">[</span><span class="hl-8">1</span><span class="hl-2">]),</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">};</span>
</code><button type="button">Copy</button></pre>
<p>A high-performance backtest computes metrics on pre-publication data:</p>
<pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">PRE_CANDLES_LIMIT</span><span class="hl-2"> = </span><span class="hl-8">1440</span><span class="hl-2">; </span><span class="hl-0">// 24h of 1m candles for baseline</span><br/><br/><span class="hl-0">// the getCandles(.., 1440) window covers exactly the 24h BEFORE the signal publication</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">preCandles</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">getCandles</span><span class="hl-2">(</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-3">&quot;1m&quot;</span><span class="hl-2">, </span><span class="hl-7">PRE_CANDLES_LIMIT</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// momentum24h โ€” total price change over the 24h before publication.</span><br/><span class="hl-0">// Positive = a pump is already in progress; negative = the market is falling.</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">momentum24hPct</span><span class="hl-2"> =</span><br/><span class="hl-2"> ((</span><span class="hl-5">preCandles</span><span class="hl-2">[</span><span class="hl-5">preCandles</span><span class="hl-2">.</span><span class="hl-5">length</span><span class="hl-2"> - </span><span class="hl-8">1</span><span class="hl-2">].</span><span class="hl-5">close</span><span class="hl-2"> - </span><span class="hl-5">preCandles</span><span class="hl-2">[</span><span class="hl-8">0</span><span class="hl-2">].</span><span class="hl-5">open</span><span class="hl-2">) /</span><br/><span class="hl-2"> </span><span class="hl-5">preCandles</span><span class="hl-2">[</span><span class="hl-8">0</span><span class="hl-2">].</span><span class="hl-5">open</span><span class="hl-2">) * </span><span class="hl-8">100</span><span class="hl-2">;</span><br/><br/><span class="hl-5">Logger</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;pre-publication data&quot;</span><span class="hl-2">, { </span><span class="hl-5">momentum24hPct</span><span class="hl-2"> })</span>
</code><button type="button">Copy</button></pre>
<p>The AI agent programs the filters, changing them as code on each update:</p>
<pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">SHORT_MIN_AVG_RANGE_PCT</span><span class="hl-2"> = </span><span class="hl-8">0.07</span><span class="hl-2">;</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">LONG_MIN_MOMENTUM_24H_PCT</span><span class="hl-2"> = -</span><span class="hl-8">1</span><span class="hl-2">;</span><br/><br/><span class="hl-0">// Filter 1: SHORT on a &quot;sleeping&quot; asset (avgRange &lt; 0.07% over the day, like TRX) โ€”</span><br/><span class="hl-0">// thin liquidity, an ideal target for a stop-hunt. This is the case of liquidity</span><br/><span class="hl-0">// harvesting: the signal must not be followed.</span><br/><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">signal</span><span class="hl-2">.</span><span class="hl-5">direction</span><span class="hl-2"> === </span><span class="hl-3">&quot;short&quot;</span><span class="hl-2"> &amp;&amp; </span><span class="hl-5">avgRangePct</span><span class="hl-2"> &lt; </span><span class="hl-7">SHORT_MIN_AVG_RANGE_PCT</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">return</span><span class="hl-2"> </span><span class="hl-4">null</span><span class="hl-2">;</span><br/><span class="hl-2">}</span><br/><br/><span class="hl-0">// Filter 2: LONG when the price has fallen more than 1% over the day โ€” &quot;catching knives&quot;.</span><br/><span class="hl-0">// There is no capital inflow, there is a decline; subscribers are being led against the trend.</span><br/><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">signal</span><span class="hl-2">.</span><span class="hl-5">direction</span><span class="hl-2"> === </span><span class="hl-3">&quot;long&quot;</span><span class="hl-2"> &amp;&amp; </span><span class="hl-5">momentum24hPct</span><span class="hl-2"> &lt; </span><span class="hl-7">LONG_MIN_MOMENTUM_24H_PCT</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">return</span><span class="hl-2"> </span><span class="hl-4">null</span><span class="hl-2">;</span><br/><span class="hl-2">}</span>
</code><button type="button">Copy</button></pre>
<p>Filter 1 catches the scam mode of liquidity harvesting (zero inflow, stop manipulation) and says &quot;do not enter&quot;. Filter 2 catches the absence of fundamental inflow (the market is falling, there is no pump) and also says &quot;do not enter&quot;. What remains is exactly what the whole thing was started for: signals under which there is <strong>real capital inflow</strong>.</p>
<a id="conclusion" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Conclusion<a href="#conclusion" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>A Telegram pump is not a market bug that will be arbitraged away and disappear. It is crowd behavior that reproduces every time the author has an audience. As long as there are subscribers โ€” there is inflow. And that means there is a fundamental factor to which the arithmetic of equilibrium does not apply: it is a game with a growing sum.</p>
<hr>
<p><em>Thank you for your attention</em></p>
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#๐Ÿ’ธ-escaping-zero-expectation-from-a-fixed-sum-game-to-a-growing-sum-game"><span>๐Ÿ’ธ <wbr/>Escaping zero expectation: from a fixed-<wbr/>sum game to a growing-<wbr/>sum game</span></a><ul><li><a href="#a-game-with-a-finite-sum"><span>A game with a finite sum</span></a></li><li><a href="#escape-into-a-game-with-a-growing-sum"><span>Escape into a game with a growing sum</span></a></li><li><a href="#piggybacking-to-paradise"><span>Piggybacking to paradise</span></a></li><li><a href="#how-to-make-money-on-this"><span>How to make money on this</span></a></li><li><a href="#conclusion"><span>Conclusion</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function(m,e,t,r,i,k,a){
m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
m[i].l=1*new Date();
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
})(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=105455585', 'ym');
ym(105455585, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/105455585" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3MQZEBBDDR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3MQZEBBDDR');
</script>