Hi all,
How would you solve the following expressions within wasora’s framework:
,
where ,
and
are fixed values,
is a wasora function and
is an indicator function that equals to one if the condition
is realized and zero otherwise. This condition checks if the function crosses the barrier level at some point in time between zero and
.
Let’s check out another case:
where we have substituted with a wasora function
and the condition must be checked in the same time interval as before, i.e.,
.
Other important cases are related to checks only in specific dates.
Finally, it is worth mentioning that I have already solved some cases but I would like to check out your ideas. Also, tricks using any kind of static or transient steps are not allowed.
As always, thanks a lot for reading and helping.
Rami
S(t) := -t^3+t^2-t+1
B(t) := t-1
K = 2
T = 5
eps = 1e-4
M = S(func_min(-S(t), t, 0, T))
V = (integral(heaviside(S(t)>B(t)), t, 0, T)>eps)*(S(T)-K)
PRINT M V
--
You received this message because you are subscribed to the Google Groups "wasora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wasora+un...@seamplex.com.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/CABqmneytKoHLgLYJCXMQmeex2ynbLM-uKSVM6Z1m6bMX%2BWoLrQ%40mail.gmail.com.