|
Description |
Displays a swap up to 12 months in length. |
|
|
Formula |
Swap(months,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13)=begin m1 = date i = 0 while i < months do begin if i==0 then totalSwap = SwapMon(i1,i2,m1) if i==1 then totalSwap = totalSwap + SwapMon(i2,i3,m1) if i==2 then totalSwap = totalSwap + SwapMon(i3,i4,m1) if i==3 then totalSwap = totalSwap + SwapMon(i4,i5,m1) if i==4 then totalSwap = totalSwap + SwapMon(i5,i6,m1) if i==5 then totalSwap = totalSwap + SwapMon(i6,i7,m1) if i==6 then totalSwap = totalSwap + SwapMon(i7,i8,m1) if i==7 then totalSwap = totalSwap + SwapMon(i8,i9,m1) if i==8 then totalSwap = totalSwap + SwapMon(i9,i10,m1) if i==9 then totalSwap=totalSwap + SwapMon(i10,i11,m1) if i==10 then totalSwap=totalSwap + SwapMon(i11,i12,m1) if i==11 then totalSwap=totalSwap + SwapMon(i12,i13,m1) i = i + 1 end retval = Scale(totalSwap,SWAP_SCALE) end |
|
|
Parameters |
months The number of months you want to swap. Valid values are 2 through 12.
i2 through i13 The contracts of a specific instrument. The contracts should be passed in order of expiration. |
|
|
Return Value |
A swap of the length specified. |
|
|
Examples |
retval = Swap(months,NG#,NG#1,NG#2,NG#3,NG#4,NG#5,
Displays a swap of a length specified in the months variable.
retval = Swap(3,NG#,NG#1,NG#2,NG#3,NG#4,NG#5,
Displays a 3 month swap. |
|
|
Comments |
NA |
©2008 Aspen Research Group, Ltd. All rights reserved. Terms of Use.