RESOLUCIN DE UNA ECUACIN EN DIFERENCIAS

BUCLE FOR
for i=1:10
    ...
end

RESOLVEREMOS...
x(t+1) = 2*x(t) + 3
x(1) = 1

Ver script: ecuacion1.m


PROCESO ESTOCSTICO

x(t+1) = 0.5*x(t) + E(t+1)

E sigue una dist. N(0,0.2^2).

Ver script: ecuacion2.m


PRECIO DE UN ACTIVO FINANCIERO

Rentabilidad:
(P(t+1) - P(t)) / P(t)

Rentabilidad logartmica:
log(P(t+1) / P(t)) = log(P(t+1)) - log(P(t))

NUESTRO EJEMPLO:
Trabajaremos con una rentabilidad anual,
con una rentabilidad que se distribuye: N(0.05,0.2^2).
- Rentabilidad media: 5 % anual
- Volatilidad: 20 % anual.

Rentabilidad diaria:
(P(t+1) - P(t)) / P(t) = 0.05/365 + 0.2/sqrt(365)*randn

Despejamos P(t+1):
P(t+1) = P(t) + 0.05/365*P(t) + 0.2/sqrt(365)*randn*P(t)

Script: ecuacion3.m


FIBONACCI

Script: ecuacion4.m

Para obtener una serie con los valores x(t+1)/x(t):
x(2:end) ./ x(1:end-1)

En la serie Fibonacci este valor tiende a:
(1+sqrt(5))/2 = 1.618
