- Quali funzioni limitate sono integrabili?
- Come posso calcolare il valore dell'integrale?
Math & games
Sunday, 22 January 2017
Introduzione agli integrali 2/2
Sunday, 15 January 2017
Insiemi e funzioni
Operazioni tra insiemi
Introduciamo alcune operazioni che possono essere eseguite tra due insiemi (unione, intersezione, differenza)Funzioni
Dati due insiemi qualunque $A$ e $B$, una funzione da $A$ in $B$ e' una legge che associa ad ogni elemento di $A$ uno ed un solo elemento di $B$. L'insieme di partenza $A$ si chiama dominio della funzione $f$, mentre l'insieme di arrivo $B$ e' detto codominio di $f$. Se $x \in A$, allora il valore della funzione corrispondente a $x$ viene indicato con la simbologia $f(x)$. La definizione di funzione e' tutta qui, ma occorre fare alcune precisazioni che torneranno utili nel seguito. L'oggetto di studio dell'analisi matematica sono le funzioni reali di variable reale, ossia delle funzioni in cui il dominio e' un sottoinsieme di $\mathbb{R}$ (l'insieme dei numeri reali) e il codominio e' $\mathbb{R}$.
Definire una funzione significa definire il dominio e una regola univoca attraverso la quale possiamo calcolare $f(x)$ per qualunque $x$ del dominio. La regola puo' essere espressa in qualunque maniera, purche' sia chiara e univoca. Solitamente molte funzioni vengono espresse mediante formule (si dice ad esempio, consideriamo la funzione $f(x)=2x$, ma occorre stabilire fin da ora che una funzione non e' una formula, ma una formula e' solo un modo per descrivere come si calcola $f(x)$ per ogni valore di $x$. Spesso si ha a che fare con funzioni che non hanno una formula esplicita - anzi la maggior parte delle funzioni non ha una formula esplicita in termini di funzioni elementari. Come dicevamo prima, in alcuni casi si parlera della funzione $f(x)=2x$ o $f(x)=\ln(x)$ senza specificare quale sia il loro dominio. In tal caso, si considera in modo tacito come dominio il piu grande sottoinsieme di $\mathbb{R}$ in cui queste funzioni sono definite. Quindi nei casi di cui sopra, il dominio di $f(x)=2x$ sara' $\mathbb{R}$ mentre il dominio di $f(x)=\ln(x)$ sara' $(0,+\inf)$, ossia i numeri reali maggiori di $0$.Grafici di funzione
Possiamo raprpeentare graficamente una funzione nel piano cartesiano. L'asse delle ascisse rappresenta il dominio, mentre l'asse delle ordinate il codominio. Possiamo quindi fissare alcuni punti $x$ del dominio, calcolare $f(x)$ e tracciare sul grafico i punti $(x,f(x))$. L'insieme $(x, f(x))$ e' detto grafico ella funzione $f$. Si osservi che, poiche' per definizione una funzione associa ad ogni elemento del dominio uno ed un solo elemento del codominio, ne deriva che se rappresentiamo il dominio sull'asse delle ascisse - come si fa di solito, ogni retta verticale intersechera' il grafico in uno ed un solo punto. In generale, una retta orizzontale potra' incontrare il grafico della funzione una, nessuna o piu' di una volta. E' infatti possibile che un punto del codominio abbia piu' di un punto del dominio che vengono mappati ad esso. Per esempio, consideriamo la funzione $f(x)=x^2$. Abbiamo $f(-1)=f(1)=1$, quindi esistono due punti del dominio, $-1$ e $1$, che hanno immagine $1$.Thursday, 12 January 2017
Massimi, minimi, sup e inf e assioma di completezza
Assioma di completezza
Siamo pronti ora ad introdurre l'ultimo fondamentale assioma che differenzia il campo dei numeri reali $\mathbb{R}$ da quello dei numeri razionali $\mathbb{Q}$Propriety di $\sup$ e $\inf$
Vediamo ora alcune proprietà importanti del $\sup$.Wednesday, 11 January 2017
Gli assiomi di campo
Supponiamo di avere un insieme, che chiameremo $F$. Supponiamo inoltre di introdurre in questo insieme due operazioni, ossia due regole che associano ad ogni coppia di elementi di $F$ un altro elemento di $F$. Indicheremo queste due operazioni rispettivamente con i simboli $+$ e $\cdot$. Dati quindi due elementi $x,y \in F$, le due operazioni associano rispettivamente gli elementi che indicheremo con $x+y$ e $x\cdot$. Per brevità, nel seguito non utilizzeremo esplicitamente il simbolo $\cdot$ ma scriveremo semplicemente $xy$ in luogo di $x\cdot y$. Inoltre chiameremo le due operazioni $+$ e $\cdot$ rispettivamente addizione e moltiplicazione.
Diremo che $F$ soddisfa gli assiomi di campo se sono verificate le seguenti proprietà: \begin{equation}\label{eq:A1} \forall x,y \in F, x+y = y+x \end{equation} \begin{equation}\label{eq:A2} \forall x,y,z \in F, x+(y+z) = (x+y)+z \end{equation} \begin{equation}\label{eq:A3} \exists 0 \in F : \forall x \in F, x+0=x \end{equation} \begin{equation}\label{eq:A4} \forall x \in F, \exists -x : x + (-x) = 0 \end{equation} \begin{equation}\label{eq:A5} \forall x,y \in F, xy = yx \end{equation} \begin{equation}\label{eq:A6} \forall x,y,z \in F, x(yz) = (xy)z \end{equation} \begin{equation}\label{eq:A7} \exists 1 \in F : \forall x \in F, x \cdot 1=x \end{equation} \begin{equation}\label{eq:A8} \forall x \in F, x \neq 0, \exists x^{-1} : xx^{-1} = 1 \end{equation} \begin{equation}\label{eq:A9} \forall x,y,z \in F, x(y+z)=xy+xz \end{equation}Gli assiomi \ref{eq:A1} - \ref{eq:A4} sono gli assiomi relative all'addizione; gli assiomi \ref{eq:A5} - \ref{eq:A8} sono relativi alla moltiplicazione, mentre l'assioma \ref{eq:A9} è l'unico che lega addizione e moltiplicazione.
Si possono riconoscere in \ref{eq:A1} e \ref{eq:A5} la proprietà commutativa, in \ref{eq:A2} e \ref{eq:A6} la proprietà associativa e in \ref{eq:A9} la proprietà distributive della somma rispetto al prodotto. \ref{eq:A3} e \ref{eq:A7} garantiscono l'esistenza dell'elemento neutro per le due operazioni, mentre \ref{eq:A4} e \ref{eq:A8} ci dicono che per ogni elemento del campo (con l'eccezione dello $0$ per la moltiplicazione), esiste un altro elemento che se sommato o moltiplicato per l'elemento iniziale ci fornisce l'elemento neutro della rispettiva operazione. Questo elemento viene chiamato elemento opposto (per l'addizione) o elemento inverso (per la moltiplicazione).
Nel seguito proveremo ad utilizzare gli assiomi di campo ed il metodo deduttivo per provare alcune proprieta' importanti.Tuesday, 1 March 2016
The forward rates
Let $P(t,T)$ denote the price at time $t$ of a bond paying one unit of currency at time $T$. If we see $P(t,T)$ as a function of $T$, then this will represent the term structure of bond prices available at time $t$. Let's suppose now that at time $t$ we adopt the following strategy: we buy one bond expiring at $T_2$, costing us $P(t,T_2)$. To finance this transaction, we sell $P(t,T_2)/P(t,T_1)$ units of a bond expiring at $T_1$. Since the inflow coming from the sale of this bond is equal to the outflow due to the purchase of the $T_2$ expiring bond, this strategy has a zero initial cost. The net result of this strategy is that we'll have an outflow of $P(t,T_2)/P(t,T_1)$ at time $T_1$ and an inflow of $1$ at $T_2$. This means that this strategy allows us to lock an interest rate of \begin{equation}\label{eq:fwdrate} \frac{1}{\Delta}\left(\frac{P(t,T_1)}{P(t,T_2)}-1\right) \end{equation} between $T_1$ and $T_2$ (here $\Delta$ represents the time in years between these two points in time). The set of rates given by \ref{eq:fwdrate} are known as forward rates, and will be denoted as $F(t,T_1,T_2)$ which must be read as the forward rate from $T_1$ to $T_2$ as seen at time $t$. Let's now introduce the concept of instantaneous forward rates. We can think of it as the forward rate when the tenor is very small, that is \[ f(t,T)=\lim_{\Delta \to 0}F(t,T,T+\Delta) \] We can find a very useful expression for this quantity by expanding the right hand side \[ f(t,T)=\lim_{\Delta \to 0}\frac{1}{\Delta}\left(\frac{P(t,T)}{P(t,T+\Delta)}-1\right)= \] \[ =\lim_{\Delta \to 0}\frac{1}{P(t,T+\Delta)}\left(\frac{P(t,T)-P(t,T+\Delta)}{\Delta}\right)=-\frac{1}{P(t,T)}\frac{\partial P(t,T)}{\partial T}= \] \[ =-\frac{\partial \text{ln}P(t,T)}{\partial T} \]
Monday, 29 February 2016
Short rate models part 1
In a short rate model, we suppose that the short rate $r(t)$ evoloves according to a predefined SDE. What might be surprising is that once we set a model for the short rate, then the knowledge of the value of the short rate at a time $t$ allows us to fully reconstruct the yield curve. To be convinced of this, let's recall that the bond prices might be obtained, using no arbitrage pricing, as follows \begin{equation}\label{eq:bond} P(t,T) = \mathbf{E}_t^Q\left(e^{-\int_t^Tr(u)du}\right) \end{equation} There are several short-rate models used in practice. Here we'll just focus on the simplest ones.
Ho-Lee Model
This is probably the simplest model for the short rate, and it is just a simple diffusion model \begin{equation}\label{eq:holee} dr(t) = \sigma dW(t) \end{equation} where $W(t)$ is the usual Brownian motion. We will now find a closed expression for bond prices in the Ho-Lee model. Integrating from $t$ to $u$ yields \begin{equation}\label{eq:cc} r(u) = r(t) + \sigma\int_u^tdW(s) \end{equation} Pluggin \ref{eq:cc} in \ref{eq:bond} yields \[ P(t,T) = \mathbf{E}_t^Q\left(e^{-r(t)(T-t)-\int_t^T\int_t^udW(s)du}\right) \] The double integral can be addressed using Fubini's theorem. Exchanging the order of integration between $u$ and $s$ we have \[ \int_t^T\int_t^u dW(s)du=\int_t^T\int_s^T du dW(s) = \int_t^T (T-s)dW(s) \] This implies that $-\int_t^Tr(u)du$ is normally distributed with mean $-r(t)(T-t)$ and variance \[ \frac{1}{3}\sigma^2(T-t)^3 \] This implies that $e^{-\int_t^Tr(u)du}$ is log-normal. Since the expectation of a log-normal variable is $e^{\mu+\frac{1}{2}\sigma^2}$, we can say that \begin{equation}\label{eq:holeebond} P(t,T)=\text{exp}\left(-r(t)(T-t)+\frac{1}{6}\sigma^2(T-t)^3\right) \end{equation} We can now derive the expression for the continuos yield, which is simply \[ y(t,T)=-\frac{\text{ln}P(t,T)}{T-t}=r(t)-\frac{1}{6}\sigma^2(T-t)^2 \] In the simple form \ref{eq:holee} it's clearly impossible to fit the term structure of discount bonds, since we only have two parameters to play with, $r(0)$ and $\sigma$. Let's now make the model more flexible by adding a deterministic function of time to the model \begin{equation}\label{eq:hl1} r(t) = r(0) + a(t) + \sigma W(t) \end{equation} The question now becomes: is it possible with this extended model to fit the initial term structure of discount bonds? And if so, what functional form $a(t)$ should have? If we assume the short rate follows \ref{eq:hl1}, that is, that the short rate process follows the SDE \begin{equation}\label{eq:hl2} dr(t) = a'(t)dt + \sigma dW(t) \end{equation} then following the same reasoning that led us to \ref{eq:holeebond}, will give us the expression for the bond prices at time $0$ in this new set-up, which is the same except for an additional factor \[ P_m(0,t)=\text{exp}\left(-r(0)t+\frac{1}{6}\sigma^2 t^3\right) \text{exp}\left(-\int_0^ta(u)du\right) \] where we have added the subscript $m$ to emphasize that these are the bond prices implied by the model, to distinguish it from the market observable bond prices $P(0,t)$. If we want to find the expression for $a(t)$ such that $P_m(0,t)=P(0,t)$ then we get, by taking the log of both sides of the equation we have \[ -\int_0^t a(u)du = r(0)t - \frac{1}{6}\sigma^2t^3 + \text{ln}P(0,t) \] Taking the derivative of both sides yields \[ a(t)=-\frac{\partial \text{ln}P(0,t)}{\partial t} - r(0) + \frac{1}{2}\sigma^2 t^2=f(0,t)-r(0)+\frac{1}{2}\sigma^2t^2 \]
Saturday, 2 January 2016
Girsanov's theorem
Let's consider two equivalent probability measures $\textbf{P}$ and $\textbf{P}^\theta$ on the measurable space $(\Omega,\cal{F})$. According to Radon-Nikodym's theorem, we know that there exists a martingale $\zeta^\theta$ such that \[ \zeta^\theta(t)=\mathbf{E}^\mathbf{P}_t\left(\frac{d\mathbf{P}^\theta}{d\mathbf{P}}\right) \] where $\frac{d\mathbf{P}^\theta}{d\mathbf{P}}$ is the Radon-Nikodym derivative linking the two probability measures. Let's now suppose that $\zeta^\theta$ satisfies the SDE \[ \frac{d\zeta^\theta}{\zeta^\theta}=-\theta(t)dW(t) \] This equation can be easily solved using Ito's lemma, yielding \[ \zeta^\theta = \text{exp}\left[-\int_0^t \theta_s dW_s -\frac{1}{2}\int_0^t \theta^2_s ds \right] \] Now, this is not necessarily a martingale. A sufficient (however difficult to verify) condition is the Novikov condition. For sake of simplicity, we'll assume that $\zeta^\theta$ is indeed a martingale. Under the above assumptions, if $W(t)$ is a Brownian motion under $\textbf{P}$, then the process \[ dW^\theta_t = dW_t + \theta_t dt \label{a}\tag{1} \] is a martingale under $\textbf{P}^\theta$.
A simple exercise
Let's suppose we have an economy with an asset whose dynamics in the physical measure is
\[
dX_t=\mu X_t dt + \sigma X_t dW_t
\label{b}\tag{2}
\]
and a bank account $B_t$ with the usual dynamics $dB_t/B_t = r dt$. What is the dynamics of $X$ under the risk-neutral measure?
We can start by reminding that under the risk-neutral measure, the discounted asset price $X_t/B_t$ is a martingale. Let's find the dynamics of this process under the physical measure. Since \[ d\left(\frac{X_t}{B_t}\right)=\frac{dX_t}{B_t}-\frac{X_t dB_t}{B_t^2} \] we can write \[ d\left(\frac{X_t}{B_t}\right)/\frac{X_t}{B_t}=\frac{dX_t}{X_t}-\frac{dB_t}{B_t}=(\mu-r)dt+\sigma dW_t \] If we change measure to $\textbf{P}^\theta$, we get, according to Girsanov's theorem \[ d\left(\frac{X_t}{B_t}\right)/\frac{X_t}{B_t}=(\mu-r-\sigma \theta)dt+\sigma dW_t^\theta \] We need now to choose the market price of risk $\theta$ in order to remove the drift of the process. We easily get \[ \theta = \frac{\mu-r}{\sigma} \] With this choice, the normalized asset price is a martingale, therefore this is the risk-neutral measure. In order to find out what is the dynamics of the asset price (non normalised) we simply substitute \ref{a} in \ref{b} yielding \[ \frac{dX_t}{X_t}=r dt + \sigma dW_t^\theta \] which is the known result stating that asset prices grow at the risk-free rate in the risk-neutral world.