Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
junder873 committed Oct 14, 2021
1 parent 689784d commit 71c2b9b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function range_join(
on1, on2 = parse_ons(on)
if minimize !== nothing
min1, min2 = parse_ons(minimize)
new_min = [min2[i] .=> min1[i]]
new_min = min2 .=> min1
else
new_min=nothing
end
Expand All @@ -323,7 +323,7 @@ function range_join(
return range_join(
df2,
df1,
[on2 .=> on1],
on2 .=> on1,
new_cond;
minimize=new_min,
join_conditions,
Expand Down Expand Up @@ -619,7 +619,7 @@ function make_ff_est_windows!(
if !suppress_warning && (est_window_end names(df) || est_window_start names(df))
x = "$est_window_start or $est_window_end are already in the "
x *= "dataframe, passing a nonmissing value to "
x *= "`FFEstMethod` `event_window` will overwrite "
x *= "`FFEstMethod` `estimation_window` will overwrite "
x *= "the preexisting values in $est_window_start and $est_window_end."
@warn x
end
Expand All @@ -629,9 +629,9 @@ function make_ff_est_windows!(
@error x
end
if typeof(ff_est.gap_to_event) <: String
to_bday = typeof(ff_est.event_window.e) == BDay ? BDay(0, ff_est.estimation_window.e.calendar) : Day(0)
df[!, est_window_end] = df[:, ff_est.gap_to_event] .+ to_bday .+ ff_estimation_window.e
df[!, est_window_start] = df[:, ff_est.gap_to_event] .+ to_bday .+ ff_estimation_window.s
to_bday = typeof(ff_est.estimation_window.e) == BDay ? BDay(0, ff_est.estimation_window.e.calendar) : Day(0)
df[!, est_window_end] = df[:, ff_est.gap_to_event] .+ to_bday .+ ff_est.estimation_window.e
df[!, est_window_start] = df[:, ff_est.gap_to_event] .+ to_bday .+ ff_est.estimation_window.s
else
# I subtract an extra day since not doing so makes the trading
# window longer and the between gap a day shorter than it should be
Expand Down

2 comments on commit 71c2b9b

@junder873
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/47179

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" 71c2b9b8207283524738efb4d7bea2ad61b64e1e
git push origin v0.1.1

Please sign in to comment.