Help to solve n equations with two unknowns

Hi..
I have n equations of the put-call parity: C=P+PV*F-K*PV, where I have vectors for C, P and K, meaning that I would like to find the two unknowns PV and F by least square. Since I am not very confident with Matlab, I have not been able to find out, how I can code this. Hope that someone can help me.
Thanks

답변 (2개)

Matt Fig
Matt Fig 2011년 3월 20일

0 개 추천

It looks like you have two unknowns and one equation. How do you think there is a unique solution?
PV * F = C - P + K * PV
One solution could be:
PV = 1
F = C - P + K * PV
another solution could be
F = 1
PV = C - P + K * PV
Or, more generally:
PV = A % A is a constant.
F = (C - P + K * PV)/A
and
F = A % A is a constant
PV = (C - P + K * PV)/A
If there is to be a unique solution, it would seem that there must be another constraining equation.

댓글 수: 2

John D'Errico
John D'Errico 2011년 3월 20일
Matt - I think you missed that C, P, K are all vectors.
Matt Fig
Matt Fig 2011년 3월 20일
No, I got that part. What I missed is where Kristine said that PV and F were _both_ scalar.

댓글을 달려면 로그인하십시오.

John D'Errico
John D'Errico 2011년 3월 20일

0 개 추천

The general equation is
C = P + PV*F - K*PV
given vectors C, P, K, and scalar unknowns PV and F. However, F appears in only one place. Suppose you rewrote this in the similar form
(C - P) = T - K*PV
Could you estimate the coefficients T and K? Yes, obviously,
params = polyfit(K,C-P,1);
PV = params(1);
T = params(2);
This is simply a traditional form linear regression problem. Then once you have the constant coefficient T and the parameter PV, recover F as
K = T/PV;

제품

질문:

2011년 3월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by