NOVICE :!! PLS help calling function!!!!

P

pino

I really dont understand why I cannot pass the vector rstar in the function
forward...it gives me #value!!!!!!!!!!
The input of the function forward is a vector of the same dimension of
rstar!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Option Base 1
Function swap(r As Variant, date_pay As Variant)
Dim fw() As Variant
Dim rstar() As Variant

n = date_pay.Rows.Count
ReDim rstar(n, 2)
ReDim fw(n, 1)

rstar = interpolated_yield_curve(r, date_pay)

fw = forward(rstar)


swap=fw

If I use just::
fw = forward(r)
swap=fw

OR

rstar=interpolated_yield_curve(r, date_pay)

swap=rstar


it works sigularly so the function are right, but i can pass the input of
the first in the other.!

why??


thank a lot!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top