Getting Started
TimeSeries
is a registered package. To add it to your Julia packages, simply do the following in REPL:
julia> Pkg.add("TimeSeries")
Throughout this tutorial, we'll be using historical financial data sets, which are made available in the MarketData
package. MarketData
is also registered and can be added:
julia> Pkg.add("MarketData")
To create dummy data without using the MarketData
package, simply use the following code block:
julia> using Dates
julia> dates = Date(2018, 1, 1):Day(1):Date(2018, 12, 31)
2018-01-01:1 day:2018-12-31
julia> ta = TimeArray(dates, rand(length(dates)))
365×1 TimeArray{Float64,1,Date,Array{Float64,1}} 2018-01-01 to 2018-12-31
│ │ A │
├────────────┼────────┤
│ 2018-01-01 │ 0.495 │
│ 2018-01-02 │ 0.6732 │
│ 2018-01-03 │ 0.9598 │
│ 2018-01-04 │ 0.6004 │
│ 2018-01-05 │ 0.8797 │
│ 2018-01-06 │ 0.9576 │
│ 2018-01-07 │ 0.6964 │
│ 2018-01-08 │ 0.3969 │
│ 2018-01-09 │ 0.5191 │
⋮
│ 2018-12-24 │ 0.1317 │
│ 2018-12-25 │ 0.8133 │
│ 2018-12-26 │ 0.6214 │
│ 2018-12-27 │ 0.5793 │
│ 2018-12-28 │ 0.6923 │
│ 2018-12-29 │ 0.9065 │
│ 2018-12-30 │ 0.2656 │
│ 2018-12-31 │ 0.3385 │