help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error: can't perform indexing operations for <unknown type> type


From: Taza
Subject: Re: error: can't perform indexing operations for <unknown type> type
Date: Mon, 12 Dec 2011 19:52:00 -0800 (PST)

Hi  John
Am trying to apply the  concept of  using cumulative product in my octave
script code,  am trying to  simulate the Asset Paths which is a perquisite
for me before I can use the octave to perform a montecarlo simulation for
option pricing. 
So I use the necessary input arguments  to evaluate the following standard 
model equation for  Evolution of equity prices given by weiner  process :
 
http://octave.1599824.n4.nabble.com/file/n4188667/Weine_Brenner_equation.jpg 

I   started by evaluating the exponent   section of the equation  using the
following  octave scripts :
http://octave.1599824.n4.nabble.com/file/n4188667/Exponent_code_2.jpg 


on running the script to see the results i got a matrix of many values from
column 1 to 15. however the run ends with an error: Matrix Cannot be indexed
with and a warning: some elements in list of return values are undefined. 
however my greatest concern is on the issue of matrix cannot be indexed
with.

then next on trying to get the cumulative product of the matrix, it does not
seem to work, the following script equation for the model  is in matlab, 
% matlab script to generate assetpaths
S = S0*[ones(1,nsims); ...
            cumprod(exp(nu*dt+sig*sqrt(dt)*randn(steps,nsims)),1)]; 
 am trying to apply the same concept in octave but it seems that iam having
a problem with my cumulative product use in octave, its really confusing me
since its not applied directly as it appears in matlab. so how should i
handle this script issue. 



--
View this message in context: 
http://octave.1599824.n4.nabble.com/error-can-t-perform-indexing-operations-for-unknown-type-type-tp1625546p4188667.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]