Sidharth Malhotra > finance-bdt-0.01 > Finance::BDT

Download:
finance-bdt-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Finance::BDT - 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.

DESCRIPTION ^

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.

TODO

- Use a term structure of volatilies - Be able to price an interest rate derivative based on the asset prices - Be able to perturb and re-price the instrument - Implement the actual calculation in C (maybe using Inline::C)

EXPORT

None by default.

SEE ALSO ^

Black, F., Derman, E., and Toy, W. "A one-factor model of interest rates and its application to treasury bond options," Financial Analysts Journal, 46 (1990), 33-39.

Hull, J. and White, A., "One-Factor interest Rate Models and the Valuation of Interest Rate Derivative Securities," Journal of Financial and Quantitive Analysis, 28 (1993), 235-254.

Klose, Chrisoph and Yuan, Li Chang. Implementation of the Black, Derman and Toy Model. http://www.lcy.net/files/BDT_Seminar_Paper.pdf

AUTHOR ^

Sidharth Malhotra, sidharth dot malhotra at gmail dot com

COPYRIGHT AND LICENSE ^

Copyright 2005 by Sidharth Malhotra

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: