Closed femtotrader closed 6 years ago
@femtotrader Thanks for the suggestion, much appreciated. I will try to get to this very soon. This actually raises a good point about having better docs about all the different ways to do constructors.
Like for random number generation, the following would work as well.
using Temporal, Base.Dates
n = 100
k = 4
seed = 1234
srand(seed)
X = TS(rand(n, k))
srand(seed)
Y = TS(rand(n, k), today()-Day(n-1):Day(1):today())
srand(seed)
Z = TS(rand(n, k), today()-Day(n-1):Day(1):today(), [:A,:B,:C,:D])
X == Y == Z # true
k
is useless.
What I prefer in my example using cumsum is that you can easily show plots after (like plotting price of a stock)
About doc, you might try Documenter.jl @iblis17 did an excellent work on https://github.com/JuliaStats/TimeSeries.jl/pull/342
Good point, will make sure to include cumsum
in what gets into the docs
And whoops on k
, updated comment to make it non-useless. What is it with me and DRY struggles lately...
But will do both univariate (k=1) and univariate (k>1) examples when I add to docs.
And I've been meaning to spend the time to learn how to use Documenter and finally just get it done but haven't ever gotten around to it. It's on my todo list but feel free to fork and open a PR if you're getting impatient with my documentation laziness and wanna get the process started a bit.
Made some changes to the readme to include examples with random values, so going to close this for now. Let me know if more to be done on this and can re-open.
Hello,
A very simple example with random value should probably be given in doc. Maybe something like this (to avoid to rely on remote data, but with a random seed to ensure reproducibility)
Kind regards