I have a class that have class method "getSimulatedPricesFrom". It will call method "projectFromPrice" from the same class during the execution. However in the line sTPlus1 line, I encounter the 2 errors:
1) Class method "projectFromPrice" not found
2) Pointer cannot be cast to type "double"
Does anyone have idea on why? I have already declare the method in .h file Below is part of the coding in AmericanOption.m file:
#import "AmericanOption.h"
@implementation AmericanOption
+(NSMutableArray*)getSimulatedPricesFrom:(double)s0 withRate:(double)r0 withVol:(double)v0 withDays:(int)D withPaths:(int)N
{
double daysPerYr = 365.0;
double sT;
double sTPlus1;
sT = s0;
...
sTPlus1 = (double)[AmericanOption projectFromPrice:sT, r0/daysPerYr, v0/daysPerYr, 1/daysPerYr];
...
return arrPricePaths;
}
+(double)projectFromPrice:(double)s0 withRate:(double)r0 withVol:(double)v0 withDt:(double)dt
{
...
}