Skip to content

Commit

Permalink
TimeSeries.jl symbol indexing (#54)
Browse files Browse the repository at this point in the history
Closes #55
  • Loading branch information
iblislin authored Oct 29, 2018
1 parent feda6f7 commit 8e4afea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.7
TimeSeries 0.9.0
TimeSeries 0.14.0
HTTP 0.6.12
Reexport
8 changes: 4 additions & 4 deletions src/const.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

# smaller datasets used for testing time-related packages
const dates = Date(2000,1,1):Day(1):Date(2001,12,31)
const cl = AAPL["Close"][dates]
const op = AAPL["Open"][dates]
const ohlc = AAPL["Open", "High", "Low", "Close"][dates]
const ohlcv = AAPL["Open", "High", "Low", "Close", "Volume"][dates]
const cl = AAPL[:Close][dates]
const op = AAPL[:Open][dates]
const ohlc = AAPL[:Open, :High, :Low, :Close][dates]
const ohlcv = AAPL[:Open, :High, :Low, :Close, :Volume][dates]
const datetime1 = readtimearray(joinpath(DATADIR, "datetime1.csv"))
const datetime2 = readtimearray(joinpath(DATADIR, "datetime2.csv"),
format="yyyy-mm-dd HH:MM:SS")
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
for (fn, name) in [(:o, "Open"), (:h, "High"), (:l, "Low"), (:c, "Close"), (:v, "Volume")]
for (fn, name) in [(:o, :Open), (:h, :High), (:l, :Low), (:c, :Close), (:v, :Volume)]
@eval @deprecate $fn(ta::TimeArray) getindex(ta, $name)
end

0 comments on commit 8e4afea

Please sign in to comment.