Skip to content

Commit

Permalink
build based on 6db8220
Browse files Browse the repository at this point in the history
  • Loading branch information
zeptodoctor committed Oct 30, 2023
1 parent 1ec6cf1 commit 8dccd3f
Show file tree
Hide file tree
Showing 18 changed files with 876 additions and 966 deletions.
6 changes: 3 additions & 3 deletions dev/apply/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@
│ 2001-12-26 │ 21.065 │
│ 2001-12-27 │ 21.123 │
│ 2001-12-28 │ 21.266 │
│ 2001-12-31 │ 21.417 │</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-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">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">moving(mean, ta, 10)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/TimeSeries.jl/blob/a3f648ba471afec7b67c6ea4d5eb116b1519098a/src/apply.jl#L84-L95">source</a></section><section><div><pre><code class="language-none">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">moving(ohlc, 10, dims = 2, colnames = [:A, ...]) do
│ 2001-12-31 │ 21.417 │</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-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">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">moving(mean, ta, 10)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/TimeSeries.jl/blob/6db82202317993b5f90713b586d2d0bd67d3c77c/src/apply.jl#L84-L95">source</a></section><section><div><pre><code class="language-none">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">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/a3f648ba471afec7b67c6ea4d5eb116b1519098a/src/apply.jl#L106-L119">source</a></section></article><h2 id="upto-1"><a class="docs-heading-anchor" href="#upto-1"><code>upto</code></a><a class="docs-heading-anchor-permalink" href="#upto-1" 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">julia&gt; using TimeSeries
end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/TimeSeries.jl/blob/6db82202317993b5f90713b586d2d0bd67d3c77c/src/apply.jl#L106-L119">source</a></section></article><h2 id="upto-1"><a class="docs-heading-anchor" href="#upto-1"><code>upto</code></a><a class="docs-heading-anchor-permalink" href="#upto-1" 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">julia&gt; using TimeSeries

julia&gt; using MarketData

Expand Down Expand Up @@ -172,4 +172,4 @@
│ 2001-12-26 │ 23028.84 │
│ 2001-12-27 │ 23050.91 │
│ 2001-12-28 │ 23073.34 │
│ 2001-12-31 │ 23095.24 │</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></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="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> on <span class="colophon-date" title="Wednesday 17 May 2023 00:22">Wednesday 17 May 2023</span>. Using Julia version 1.5.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
│ 2001-12-31 │ 23095.24 │</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></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="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> on <span class="colophon-date" title="Monday 30 October 2023 02:11">Monday 30 October 2023</span>. Using Julia version 1.5.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 8dccd3f

Please sign in to comment.