Getting Started

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:

dates  = collect(Date(1999,1,1):Date(2000,12,31))
mytime = TimeArray(dates, rand(length(dates)))
731x1 TimeSeries.TimeArray{Float64,1,Date,Array{Float64,1}} 1999-01-01 to 2000-12-31
│            │        │
├────────────┼────────┤
│ 1999-01-01 │ 0.3329 │
│ 1999-01-02 │ 0.8539 │
│ 1999-01-03 │ 0.3662 │
│ 1999-01-04 │ 0.661  │
│ 1999-01-05 │ 0.653  │
│ 1999-01-06 │ 0.9939 │
│ 1999-01-07 │ 0.9342 │
│ 1999-01-08 │ 0.0324 │
│ 1999-01-09 │ 0.897  │
   ⋮
│ 2000-12-24 │ 0.7989 │
│ 2000-12-25 │ 0.6797 │
│ 2000-12-26 │ 0.67   │
│ 2000-12-27 │ 0.9379 │
│ 2000-12-28 │ 0.4778 │
│ 2000-12-29 │ 0.9985 │
│ 2000-12-30 │ 0.7239 │
│ 2000-12-31 │ 0.8174 │