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

HBS-3908: add bonds yield_<1|30|365>_days #325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fellainthewagon
Copy link

@fellainthewagon fellainthewagon commented Oct 27, 2023

bonds yields:
- "close_1_days_back"
- "close_30_days_back"
- "close_365_days_back"

@fellainthewagon fellainthewagon force-pushed the hbs-3908-bonds-30-and-365-days-yields branch from aa6a607 to 71323d6 Compare October 27, 2023 18:25
countOfBars1DayAgoBond = fastSearchN(time, dayAgoYield, dayYield)
countOfBars1MonthAgoBond = fastSearchN(time, monthAgoYield, monthYield)
countOfBars1YearAgoBond = fastSearchN(time, yearAgoYield, yearYield)
bondYield1 = request.security(bondTickerIDYield, timeframe.period, close[countOfBars1DayAgoBond], ignore_invalid_symbol=true)
Copy link
Contributor

Choose a reason for hiding this comment

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

клоуз бонда уже и есть его yield. нам не надо дозапрашивать новый тикер, а надо просто делать close - close[period], чтобы получить ченж по доходности.

Copy link
Author

Choose a reason for hiding this comment

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

так сделал чтобы отфильтровать не Y символы, на сколько я вижу там всегда пара. Например KR30 и KR30Y, BE04 и BE04Y, etc. Но ты говоришь, что чендж надо? В задаче просто close[period] же нет?

Copy link
Contributor

Choose a reason for hiding this comment

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

ой, сорри, да - только close[period]

@fellainthewagon fellainthewagon force-pushed the hbs-3908-bonds-30-and-365-days-yields branch from 71323d6 to 11cc555 Compare October 30, 2023 13:06
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