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

Refactor/rolling beta #19

Merged
merged 5 commits into from
Sep 15, 2020
Merged

Refactor/rolling beta #19

merged 5 commits into from
Sep 15, 2020

Conversation

anor4k
Copy link
Member

@anor4k anor4k commented Sep 14, 2020

Reescreve o código do rolling beta para simplificar o processo e deixar similar ao rolling sharpe

@anor4k
Copy link
Member Author

anor4k commented Sep 14, 2020

pera tem alguma coisa errada aqui

@anor4k
Copy link
Member Author

anor4k commented Sep 15, 2020

ok tinha umas cagadinhas de merge mas resolvi 👍

Comment on lines +66 to +67
rolling_beta = pd.Series([beta(returns[i-window:i], benchmark[i-window:i])
for i in range(window, len(returns))], index=returns[window:].index)
Copy link
Member

Choose a reason for hiding this comment

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

Bem legal essa solução com list comprehension

Copy link
Member Author

Choose a reason for hiding this comment

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

sim, tava meio zoado ficar convertendo pra dataframe

@anor4k anor4k merged commit 122d509 into master Sep 15, 2020
@anor4k anor4k deleted the refactor/rolling_beta branch September 15, 2020 00:14
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.

2 participants