Skip to content

Commit

Permalink
bugfix in finding close price column if not adjusted close present
Browse files Browse the repository at this point in the history
  • Loading branch information
dysonance committed Jul 13, 2018
1 parent 9ac8744 commit 228f93e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ohlc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ vo(x::TS)::TS = x[:,findfirst(ismatch.(r"(vo)"i, String.(x.fields)))]
function cl(x::TS; use_adj::Bool=true, allow_settle::Bool=true, allow_last::Bool=true)::TS
columns = String.(x.fields)
if use_adj
j = findfirst(ismatch.(r"(adj((usted)|\s|)+)(cl)"i, columns))
j = findfirst(ismatch.(r"(adj((usted)|\s|)+)?(cl)"i, columns))
if j != 0
return x[:,j]
end
Expand Down

0 comments on commit 228f93e

Please sign in to comment.