-1

Hy everyone,

I would like to price vanilla options with Nd4J.

So i am looking to achieve the operation with Nd4J

max(0,X[i]-K) => Y[i]

with X the input INDArray K a float Y the output INDArray

Is someone have an idea how to proceed ?

Thanks by advance for the time you could according to me

alx
  • 29
  • 1
  • 3

1 Answers1

0

I am answering to myslef

INDArray Y=Transforms.max(X.add(-K), 0f);

alx
  • 29
  • 1
  • 3