Skip to content

Commit

Permalink
reformat, bump version to v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerjthomas9 committed Jun 5, 2023
1 parent 3a2c978 commit 8ef5625
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SaguaroTrader"
uuid = "26277856-a3f7-4646-aaac-f090473ab108"
authors = ["Tyler Thomas <[email protected]>"]
version = "0.2.0"
version = "0.2.1"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
8 changes: 6 additions & 2 deletions src/data/daily_bar_csv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ function _convert_bar_frame_into_df_bid_ask(
df_bid = vcat(df_open, df_close; cols=:union)
sort!(df_bid, time_col)
if any(ismissing.(df_bid.Ask))
df_bid = transform(df_bid, "Ask" .=> x -> impute(x, LOCF(;limit=limit); dims=:cols); renamecols=false)
df_bid = transform(
df_bid,
"Ask" .=> x -> impute(x, LOCF(; limit=limit); dims=:cols);
renamecols=false,
)
end
df_bid.Bid = df_bid.Ask

Expand Down Expand Up @@ -189,7 +193,7 @@ struct CSVDailyBarSource <: DataSource
csv_symbols::Union{Nothing,Vector{Symbol}}=nothing,
market_open::Dates.CompoundPeriod=Hour(14) + Minute(30),
market_close::Dates.CompoundPeriod=Hour(20) + Minute(59),
start_dt::DateTime=DateTime(1900),
start_dt::DateTime=DateTime(1900),
end_dt::DateTime=DateTime(2100),
time_col::Symbol=:timestamp,
open_col::Symbol=:Open,
Expand Down

0 comments on commit 8ef5625

Please sign in to comment.