You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(fixed_income): implement zero-coupon bond pricing (#75)
* Add FI module definition
* Add trait module for FI
* Add PriceResult struct
* Add FI types and custom pricing errors
* Add ZeroCouponBond struct and implement Bond trait for pricing
* Update day_count to include year_fraction and day_count methods
* Add TODOs
* Refactor ZeroCouponBond pricing logic to use DayCountConvention
* Refactor bond module documentation and add test cases for ZeroCouponBond
* Remove out unused future bond imports
* Add basic tests
* Add cashflow tests for schedule generation and price result validation
* Remove unused imports and bond_price function stub from bond_pricing.rs
* Update README and add Zero Coupon Bond example
* update zero coupon bond tests and add day count tests
* add maturity handling to FI day_counts
* fix linting
* add validation tests for ZeroCouponBond pricing errors
* update tests
* remove unused leap year check
* update icma daycount tests
Copy file name to clipboardExpand all lines: README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@
21
21
22
22
Quantrs is a tiny quantitative finance library for Rust.
23
23
It is designed to be as intuitive and easy to use as possible so that you can work with derivatives without the need to write complex code or have a PhD in reading QuantLib documentation.
24
-
The library is still in the early stages of development, and many features are not yet implemented.
24
+
The library is still in the early stages of development and many features are not yet implemented.
25
25
26
26
Please check out the documentation [here][docs-url].
27
27
@@ -86,6 +86,18 @@ Quantrs supports options pricing with various models for both vanilla and exotic
86
86
87
87
</details>
88
88
89
+
### Fixed Income
90
+
91
+
- Bond Types
92
+
-[x]_Zero-Coupon Bonds_
93
+
-[ ]_Treasury Bonds_ (fixed-rate coupon)
94
+
-[ ]_Corporate Bonds_ (fixed-rate coupon with credit spreads)
95
+
-[ ]_Floating-Rate Bonds_ (variable coupon with caps/floors)
log_warn!("Act/Act ICMA year fraction called without maturity and frequency; defaulting to semi-annual frequency and end date as maturity. Use year_fraction_with_maturity for accurate results.");
0 commit comments