summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-10-03 23:05:41 +0000
committerKarl Berry <karl@freefriends.org>2010-10-03 23:05:41 +0000
commit03424a93def5da4535267cf5f84f43ddc9dca37d (patch)
tree7ed568889393347895b924c8f5d5542fc8228642 /Master/texmf-dist/dvips
parent2f9ee80b6a23be81d9a49efefff1de8bfc16c346 (diff)
pst-func 0.70 (2oct10)
git-svn-id: svn://tug.org/texlive/trunk@19988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips')
-rw-r--r--Master/texmf-dist/dvips/pst-func/pst-func.pro28
1 files changed, 27 insertions, 1 deletions
diff --git a/Master/texmf-dist/dvips/pst-func/pst-func.pro b/Master/texmf-dist/dvips/pst-func/pst-func.pro
index f1f274dc54c..c190e16fb78 100644
--- a/Master/texmf-dist/dvips/pst-func/pst-func.pro
+++ b/Master/texmf-dist/dvips/pst-func/pst-func.pro
@@ -1,4 +1,4 @@
-%% $Id: pst-func.pro 355 2010-06-21 10:02:44Z herbert $
+%% $Id: pst-func.pro 391 2010-10-02 16:43:32Z herbert $
%%
%% This is file `pst-func.pro',
%%
@@ -313,6 +313,32 @@ tx@FuncDict begin
end
} def
%
+/vasicek{ %density=sqrt((1-R2)/R2)*exp(1/2*(norminv(x)2 - (1/sqrt(R2)*((sqrt(1-R2)*norminv(x)-norminv(pd)))2))
+ 2 dict begin
+ /pd where { pop }{ /pd 0.22 def } ifelse % element of (0,1) probability of default of portfolio
+ /R2 where { pop }{ /R2 0.11 def } ifelse % element of (0,1) R_Squared of portfolio
+ dup % x x
+ norminv % x norminv(x)
+ dup mul % x norminv(x)^2
+ exch % norminv(x)2 x
+ norminv % norminv(x)2 norminv(x)
+ 1 R2 sub sqrt mul % norminv(x)2 sqrt(1-R2)*norminv(x)
+ pd norminv sub % norminv(x)2 sqrt(1-R2)*norminv(x)-norminv(pd)
+ R2 sqrt div % norminv(x)2 1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd))
+ dup mul % norminv(x)2 (1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2
+ sub % norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2
+ 2 div % 1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2)
+ ENeperian exch exp % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2)
+ 1 R2 sub % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2) 1-R2
+ R2 div % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2) (1-R2)/R2
+ sqrt % exp(1/2*(norminv(x)2 -(1/sqrt(R2)*(sqrt(1-R2)*norminv(x)-norminv(pd)))2) sqrt((1-R2)/R2)
+ mul % sqrt((1-R2)/R2)*exp(1/2*(norminv(x)2 - (1/sqrt(R2)*((sqrt(1-R2)*norminv(x)-norminv(pd)))2))
+ end
+} def
+%end{vasicek density}
+%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% subroutines for complex numbers, given as an array [a b]
% which is a+bi = Real+i Imag
%