Finance::BDT 0.01 review

Download
by rbytes.net on

Finance::BDT is a Perl module that implements BDT yield curve model. SYNOPSIS use Finance::BDT; use Data::Dumper my @y

License: GPL (GNU General Public License)
File size: 4K
Developer: Sidharth Malhotra
0 stars award from rbytes.net

Finance::BDT is a Perl module that implements BDT yield curve model.

SYNOPSIS

use Finance::BDT;
use Data::Dumper
my @y = (0, 0.0283, 0.029, 0.0322, 0.0401, 0.0435, 0.0464, 0.0508, 0.0512); ## YTM on strips
my $vol = 0.20; ## constant volatility
my $epsilon = 0.01;
my ($r, $d, $A) = Finance::BDT::bdt( -yields => @y, -epsilon => $epsilon, -volatility => $vol );
print "Short Rates: n", Dumper $r;
print "Discount Prices: n", Dumper $d;
print "Asset State Prices: n", Dumper $A;

ABSTRACT

Sample implementation of Black-Derman-Toy model.

Finance::BDT implements a constant volatility Black-Derman-Toy model in Perl. Not that you should be building your curves in perl, but now you can. The current implementation works with constant volatility but I am testing a version which allows you to pass in a term structure of volatilities. The input is the zero curve (as observed yields), a constant volatility, and a limit for the numerical solution. The function returns the interest rate tree as a list of lists (first index being the time period, and second being the position with the lowest rate having index 0). Three trees are returned: the short rates at each period, the discount prices and most importantly the state prices.

The examples directory has an untested sample implementation in C for the brave.

Requirements:
Perl

Finance::BDT 0.01 search tags