[R-SIG-Finance] Iterative equation solver
Moshe Olshansky
m_olshansky at yahoo.com
Tue Sep 16 03:58:02 CEST 2008
Hi Ben,
The function is non-linear but it is of only one argument, so you can use uniroot to find it's root. Moreover, the function is monotone, so there should be no problem finding it's zero. For reasonable strike prices it should behave quite well, otherwise it can be very flat and finding a very accurate root may be difficult, but first of all you can overcome this by using either midpoint or linear interpolation between the current end-points (you may need to compute the function values quite accurately), and secondly, if the function is very flat and your zero is not very accurate, it will have a very small effect on the option price.
Regards,
Moshe.
--- On Tue, 16/9/08, Chiquoine, Ben <BChiquoine at tiff.org> wrote:
> From: Chiquoine, Ben <BChiquoine at tiff.org>
> Subject: [R-SIG-Finance] Iterative equation solver
> To: r-sig-finance at stat.math.ethz.ch
> Received: Tuesday, 16 September, 2008, 6:56 AM
> Hi
>
>
>
> I am trying to solve for the "Critical Price" in
> a compound option.
> This involves solving a very non linear equation that I
> think can only
> be solved iteratively. My question is, is there an
> iterative solve
> function (similar to the solver in excel) written anywhere
> for R? I've
> seen a couple of posts that seem similar to this one but so
> far I have
> been unable to find an existing function. Any feedback
> would be greatly
> appreciated!
>
>
>
> Thanks,
>
>
>
> Ben
>
>
> ___________________________________________
> This message and any attached documents contain
> information which may be confidential, subject to
> privilege or exempt from disclosure under applicable
> law. These materials are solely for the use of the
> intended recipient. If you are not the intended
> recipient of this transmission, you are hereby
> notified that any distribution, disclosure, printing,
> copying, storage, modification or the taking of any
> action in reliance upon this transmission is strictly
> prohibited. Delivery of this message to any person
> other than the intended recipient shall not
> compromise or waive such confidentiality, privilege
> or exemption from disclosure as to this
> communication.
>
> If you have received this communication in error,
> please notify the sender immediately and delete
> this message from your system.
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
More information about the R-SIG-Finance
mailing list