Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small changes and todos for hedge ratio #315

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

rsueppel
Copy link
Contributor

hedge_ratio seems mostly fine, but please check out the todos in the pull request

Some clean-up for efficiency and transparency is needed in hedge_calculator.
Pandas offers functions to solve some custom problems quickly.
I suggest the following for getting hedge ratios into a frame:
[1] fill pre-allocated df with estimates on days of estimation
[2] upsample to original businness day frame with asfreq() and 'ffill'
[3] then use .shift(1)
You would need neither date_weekend nor the lambda function date_adjustment.

In the test file you should add test of correct hedge ratio by comparing one or more ratio with a
regression result generated outside the functions.

@rsueppel rsueppel requested a review from Ksteeds April 16, 2022 15:46
@Ksteeds Ksteeds merged commit 5d3e8b3 into feature/portfolio_hedging Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants