Skip to content

Commit

Permalink
Using model's own getNumberOfFactors.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfries committed Oct 20, 2023
1 parent 1744ca6 commit 2807ebe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ public RandomVariable[] getDrift(final MonteCarloProcess process, final int time
}

// Allocate array (for each k) for the sums of delta_{i}/(1+L_{i} \delta_i) f_{i,k} (+ for spot measure, - for terminal measure)
final RandomVariable[] factorLoadingsSums = new RandomVariable[process.getNumberOfFactors()];
final RandomVariable[] factorLoadingsSums = new RandomVariable[getNumberOfFactors()];
Arrays.fill(factorLoadingsSums, zero);

if(measure == Measure.SPOT) {
Expand Down

0 comments on commit 2807ebe

Please sign in to comment.