Finance::BDT

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

Finance::BDT Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Sidharth Malhotra
  • Publisher web site:
  • http://search.cpan.org/~smalhotra/Finance-YahooProfile-0.12/YahooProfile.pm

Finance::BDT Tags


Finance::BDT Description

Finance::BDT is a Perl module that implements BDT yield curve model. 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 Related Software