Skip to content

Commit

Permalink
build based on 7bd872c
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Apr 23, 2024
1 parent 2a793fd commit 1313d62
Show file tree
Hide file tree
Showing 19 changed files with 429 additions and 429 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-23T00:05:39","documenter_version":"1.4.0"}}
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-23T00:10:14","documenter_version":"1.4.0"}}
6 changes: 3 additions & 3 deletions dev/apply/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@
│ 2001-12-28 │ 21.266 │
│ 2001-12-31 │ 21.417 │
└────────────┴─────────┘
<span class="sgr36"> 476 rows omitted</span></span></code></pre><p>As mentioned previously, we lose the first nine observations to the consuming nature of this operation. They are not <strong>missing</strong> per se, they simply do not exist.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="TimeSeries.moving" href="#TimeSeries.moving"><code>TimeSeries.moving</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">moving(f, ta::TimeArray{T,1}, w::Integer; padding = false)</code></pre><p>Apply user-defined function <code>f</code> to a 1D <code>TimeArray</code> with window size <code>w</code>.</p><p><strong>Example</strong></p><p>To calculate the simple moving average of a time series:</p><pre><code class="language-julia hljs">moving(mean, ta, 10)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/TimeSeries.jl/blob/2c51c6aabf714919cd475e07cbb7e8268829578b/src/apply.jl#L84-L95">source</a></section><section><div><pre><code class="language-julia hljs">moving(f, ta::TimeArray{T,2}, w::Integer; padding = false, dims = 1, colnames = [...])</code></pre><p><strong>Example</strong></p><p>In case of <code>dims = 2</code>, the user-defined function <code>f</code> will get a 2D <code>Array</code> as input.</p><pre><code class="language-julia hljs">moving(ohlc, 10, dims = 2, colnames = [:A, ...]) do
<span class="sgr36"> 476 rows omitted</span></span></code></pre><p>As mentioned previously, we lose the first nine observations to the consuming nature of this operation. They are not <strong>missing</strong> per se, they simply do not exist.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="TimeSeries.moving" href="#TimeSeries.moving"><code>TimeSeries.moving</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">moving(f, ta::TimeArray{T,1}, w::Integer; padding = false)</code></pre><p>Apply user-defined function <code>f</code> to a 1D <code>TimeArray</code> with window size <code>w</code>.</p><p><strong>Example</strong></p><p>To calculate the simple moving average of a time series:</p><pre><code class="language-julia hljs">moving(mean, ta, 10)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/TimeSeries.jl/blob/7bd872cabddd2623bdc9a0f12ede3aec6ffea28c/src/apply.jl#L84-L95">source</a></section><section><div><pre><code class="language-julia hljs">moving(f, ta::TimeArray{T,2}, w::Integer; padding = false, dims = 1, colnames = [...])</code></pre><p><strong>Example</strong></p><p>In case of <code>dims = 2</code>, the user-defined function <code>f</code> will get a 2D <code>Array</code> as input.</p><pre><code class="language-julia hljs">moving(ohlc, 10, dims = 2, colnames = [:A, ...]) do
# given that `ohlc` is a 500x4 `TimeArray`,
# size(A) is (10, 4)
...
end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/TimeSeries.jl/blob/2c51c6aabf714919cd475e07cbb7e8268829578b/src/apply.jl#L106-L119">source</a></section></article><h2 id="upto"><a class="docs-heading-anchor" href="#upto"><code>upto</code></a><a id="upto-1"></a><a class="docs-heading-anchor-permalink" href="#upto" title="Permalink"></a></h2><p>Another operation common in time series analysis is an aggregation function. <code>TimeSeries</code> supports this with the <code>upto</code> method. Suppose you want to keep track of the sum of all the values from the beginning to the present timestamp. You would use the <code>upto</code> method like this:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; using TimeSeries</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; using MarketData</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; upto(sum, cl)</code><code class="nohighlight hljs ansi" style="display:block;">500×1 TimeArray{Float64, 1, Date, Vector{Float64}} 2000-01-03 to 2001-12-31
end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/TimeSeries.jl/blob/7bd872cabddd2623bdc9a0f12ede3aec6ffea28c/src/apply.jl#L106-L119">source</a></section></article><h2 id="upto"><a class="docs-heading-anchor" href="#upto"><code>upto</code></a><a id="upto-1"></a><a class="docs-heading-anchor-permalink" href="#upto" title="Permalink"></a></h2><p>Another operation common in time series analysis is an aggregation function. <code>TimeSeries</code> supports this with the <code>upto</code> method. Suppose you want to keep track of the sum of all the values from the beginning to the present timestamp. You would use the <code>upto</code> method like this:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; using TimeSeries</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; using MarketData</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; upto(sum, cl)</code><code class="nohighlight hljs ansi" style="display:block;">500×1 TimeArray{Float64, 1, Date, Vector{Float64}} 2000-01-03 to 2001-12-31
┌────────────┬─────────┐
<span class="sgr1"> │ Close │
├────────────┼─────────┤
Expand Down Expand Up @@ -160,4 +160,4 @@
│ 2001-12-28 │ 23073.3 │
│ 2001-12-31 │ 23095.2 │
└────────────┴─────────┘
<span class="sgr36"> 485 rows omitted</span></span></code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../operators/">« Mathematical, comparison, and logical operators</a><a class="docs-footer-nextpage" href="../combine/">Combine methods »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.4.0 on <span class="colophon-date" title="Tuesday 23 April 2024 00:05">Tuesday 23 April 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
<span class="sgr36"> 485 rows omitted</span></span></code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../operators/">« Mathematical, comparison, and logical operators</a><a class="docs-footer-nextpage" href="../combine/">Combine methods »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.4.0 on <span class="colophon-date" title="Tuesday 23 April 2024 00:10">Tuesday 23 April 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
234 changes: 117 additions & 117 deletions dev/bw.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1313d62

Please sign in to comment.