Atualizações e NTN-B Classs#50
Open
Machgui wants to merge 1 commit intoFinance-Hub:masterfrom
Open
Conversation
Retirando dependencias interclassesl, Adicionando classe NTN-B,
gusamarante
reviewed
Apr 24, 2021
| rate: Optional[float] = None, | ||
| price: Optional[float] = None, | ||
| vna: Optional[float] = None, | ||
| principal: float = 1e6, |
Member
There was a problem hiding this comment.
Porque esse principal é necessário? o VNA da NTNB já é o principal dela.
| ref_date: Date = TODAY): | ||
| """ | ||
| Class constructor. | ||
| This is a Brazilian government bond that pays coupons every six months |
Member
|
Usei o código abaixo para testar a classe, ela crava o preço da ANBIMA. Parabéns!. Mas tem o problema Também achei esse código muito parecido com o da Pull Request #48 e #49. Muito improvável que vocês, trabalhando separadamente tenham chegado num código tão parecido. from finmath.brazilian_bonds.government_bonds import NTNB
ntn = NTNB(expiry='2050-08-15',
rate=0.044125,
updated_nominal_value=3517.844181,
ref_date='2021-04-23')
print('Preço calculado foi de', ntn.price)
print('PU na ANBIMA é de 4.460,278154') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Arrumando convenções anbima (Trunc,Round,principal),
Retirando dependencias interclasses,
Adicionando classe NTN-B,