instruction
stringlengths
15
26.1k
Can there be a swap with zero notional on one leg alone? If so, what is the swap used for ?
### Why the formula in the book is wrong The "formula" in the book for standard deviation of two assets is severely misleading, even wrong. You cannot add together SDs like that, you must add variances. For two independent random variables $X_1$ and $X_2$ with weights $w_1$ and $w_2$ $$ \mathbb{V}[w_1X_1 + w_2X_2]...
**1. Theory** The Student $t$ distribution does not exhibit a moment generating function $$ M_X(t)=\mathbb{E}\left(e^{tX} \right) $$ Hence, there exist no closed form solution for $M_X(t=1)=\mathbb{E}\left(e^X\right)$, i.e. the expected future spot price. Thus, at least theoretically, we are not able to pinpo...
How to compare mean-variance-skewness-kurtosis portfolios obtained by expected utility maximization?
Suppose I have some portfolios which are the result of maximizing the expected utility of different approximations of a utility function, how do you test these portfolio's out-of-sample and how do you compare these results? More specifically, I am trying to compare the MV (mean-variance), MVS (mean-variance-skewness...
How to compare mean-variance-skewness-kurtosis portfolios obtained by expected utility maximization?
Suppose I have some portfolios which are the result of maximizing the expected utility of different approximations of a utility function, how do you test these portfolio's out-of-sample and how do you compare these results? More specifically, I am trying to compare the MV (mean-variance), MVS (mean-variance-skewness...
Suppose I have some portfolios which are the result of maximizing the expected utility of different approximations of a utility function, how do you test these portfolio's out-of-sample and how do you compare these results? More specifically, I am trying to compare the MV (mean-variance), MVS (mean-variance-skewness...
Suppose I have some portfolios which are the result of maximizing the expected utility of different approximations of a utility function, how do you test these portfolio's out-of-sample and how do you compare these results? More specifically, I am trying to compare the MV (mean-variance), MVS (mean-variance-skewness...
Suppose I have some portfolios which are the result of maximizing the expected utility of different approximations of a utility function, how do you test these portfolio's out-of-sample and how do you compare these results? More specifically, I am trying to compare the MV (mean-variance), MVS (mean-variance-skewness...
Built some tree methods to price american options with discrete dividends. But I have no way to really verify my work. Questions below: 1) Does it make sense to build a Monte Carlo pricer to use as a benchmark to measure the results of the trees against. 2) What is the best way to build such a Monte Carlo pricer fo...
Note: This is a crosspost from [this post][1] on cross-validated, where it did not receive an answer. I thought I might have better luck here. I am looking for a rigorous and general treatment of cointegration. Unfortunately, many of the econometrics textbooks and papers I have found in this area either place a lot ...
I am using TIA package in Python to download an interest rate curve. Using the following script I get the last curve. How do I specify a date in the past to have a curve in the past? import tia.bbg.datamgr as dm curve="YCSW0045 Index" mgr = dm.BbgDataManager() msft=mgr[curve] msft["CURVE_...
I have been trying to understand how to price FX options with barriers. In Hull (Options, Futures, and Other Derivatives), there are closed formulas how to calculate the premiums of European Call and Put options with barriers. However, I am not able to find either closed formula or a model of computing the price of FX ...
Can someone elaborate the difference between the two, and what is the typical convention used in markets? If there is a mathematical relationship. Any helpful links/guides would be appreciated as well, all in the context of European FX Options.
If utility is your measure of performance, then it will still be your measure of performance out of sample, since it is what you care about. You can see utility as a measure of the balance between profit and risk, where risk is some combination of variance, skew, kurtosis... Your wealth is a random variable $X$ ...
Looking at post from https://quant.stackexchange.com/questions/37237/issue-using-quantlib-and-python-to-calculate-price-and-greeks-for-american-optio#37245 and trying to recreate the result; but getting a constructor error I cannot debug. Anyone know what the cause of this is? import QuantLib as ql ...
Constructor error pricing american ops with divs quantlib?
The **maximum expected return portfolio** is the one that assigns a 100% weight to the asset with the highest expected return amongst all assets under consideration. Shouldn't then the asset with the lowest variance in the candidate pool likewise be assigned a 100% weight in the **minimum-variance portfolio**, using...
Why isn't the asset with minimum variance given a 100% portfolio weight?
The **maximum expected return portfolio** is the one that assigns a 100% weight to the asset with the highest expected return amongst all assets under consideration. Shouldn't then the asset with the lowest variance in the candidate pool likewise be assigned a 100% weight in the **minimum-variance portfolio**, using...
If you start out with a matrix specifying the covariance of every pair of assets, and an alpha for every asset (because people usually do), and define an objective function that maximizes the alpha and minimizes the variance of the portfolio, and run a quadratic optimizer, but don't specify a lot of constraints, then ...
I've a portfolio of a set of loans to analyse and I need to find the roll rate, Can someone explain the process of roll rate model building ? Thanks
**Diversification is key**. The clear cut answer is *diversification*. A weighted combination of assets will more often than not show a lower return variance than even the asset with the lowest variance across the asset universe. **The setup** *Without loss of generality*, let us assume there exist two assets ...
Given that LIBOR quotes have value date T+2, when considering a simple IRS, which dates are considered when fixing the floating rate? Say floating leg is Euribor 3M and next fixing date is today (02/12/2020), is the fixed rate set to the rate set today (which is essentially a 2 day forward rate)? The reason I am ask...
$$\arg \min_w w^\top \Sigma w$$ \begin{align}\text{s.t.} \quad \mathbf{1}^\top w = 1 \end{align} is the optimization problem for the **minimum-variance portfolio** weights, whose analytical solution, derived from the above's Lagrangean formulation, is $$w_{MV}=\frac{\Sigma^{-1}\mathbf{1}}{\mathbf{1}^T\Sigma^{-1}\mat...
$$\arg \min_w \quad w^\top \Sigma w$$ \begin{align}\text{s.t.} \quad \mathbf{1}^\top w = 1 \end{align} is the optimization problem for the **minimum-variance portfolio** weights, whose analytical solution, derived from the above's Lagrangean formulation, is $$w_{MV}=\frac{\Sigma^{-1}\mathbf{1}}{\mathbf{1}^T\Sigma^{-...
$$\arg \min_w \quad w^\top \Sigma w$$ \begin{align}\text{s.t.} \quad \mathbf{1}^\top w = 1 \end{align} is the optimization problem for the **minimum-variance portfolio** weights, whose analytical solution, derived from the above's Lagrangean formulation, is $$w_{MV}=\frac{\Sigma^{-1}\mathbf{1}}{\mathbf{1}^T\Sigma^{-...
Hey I try to price options in VBA. To do this I need to define characteristic function and do some operations on complex numbers. For example I have this code: Function cf(u, T, r, q, sigma) i = WorksheetFunction.Complex(0, 1) b = r - q - 0.5 * sigma ^ 2 cf = WorksheetFunction.ImExp(T * (i * u * ...
When I calculate the Macaulay Duration of my portofolio (vanilla bonds) Should i have to use clean or dirty price to price my portfolio? What is the logic to use one or the other? Thanks a lot!
Portfolio Duration . Dirty or Clean Price?
Ahhh Excel VBA, the pinnacle of cubicle programming. *Been there, done that!* The functions that you quote are indeed [returning ```string``` types.][1] But you should be able to compose those functions, e.g. ``` Option Explicit Public Function cf(u As Double, ttm As Double, rf As Double, q As Double, s As Doub...
Which is more expensive: A European call option on constant volatility of 30% or or drawn from a random distribution of mean 30%? The answer in A Practical Guide To Quantitative Finance Interviews, isnt very clear at all. The justification as to why stochastic volatility would make the price more or less expensiv...
Ahhh complex numbers in Excel VBA, the pinnacle of cubicle programming. *Been there, done that!* The functions that you quote are indeed [returning ```string``` types.][1] But you should be able to compose those functions, e.g. ``` Option Explicit Public Function cf(u As Double, ttm As Double, rf As Double, q A...
For someone who has a *delta hedged* options position, the $\Gamma:= \frac{\partial^2V}{\partial S^2}$ roughly quantifies the amount of money made or lost if $$\frac{1}{\Delta t}\frac{(\Delta S)^2}{S^2} \neq \sigma^2$$ where $\sigma$ is the number that characterizes the process: $$ dS_t = S_t(\mu dt + \sigma dW_t) ...
>many consider it to be the sensitivity of option price to "implied volatility" This may just be a semantic issue- it's the sensitivity to _volatility_, regardless of how that volatility is computed. Since the volatility in the black-scholes model is a _forward-looking_ volatility, there's no observable way to meas...
>many consider it to be the sensitivity of option price to "implied volatility" This may just be a semantic issue- it's the sensitivity to _volatility_, regardless of how that volatility is computed. Since the volatility in the black-scholes model is a _forward-looking_ volatility, there's no observable way to meas...
Does anyone know of any website where I can obtain corporate bond's data in the same fashion as "cbonds" (they let you look up by issuer, maturity, etc.). Ideally free? I need to know bond issues by Rio de Janeiro in Brazil. Thanks.
Free website to obtain corporate bond's data similar to cbonds?
In general - for other countries - of course not. But in case of Brazil, you are lucky. Brazil is more advanced than most other countries in this regard. All the debentures are exchange-listed and easy to find. You can see all the debentures, for example, on https://data.anbima.com.br/debentures or http://www.debent...
[Jensen's inequality][1] states that given a convex function $f(x)$ and random variable $X$ we have $$ \mathbb{E}[f(X)] \geq f(\mathbb{E}[X]). $$ [1]: https://en.wikipedia.org/wiki/Jensen%27s_inequality Now $f$ is our call price, and $X$ is our random volatility with $\mathbb{E}[X]=\sigma_0$. The question now...
[Jensen's inequality][1] states that given a convex function $f(x)$ and random variable $X$ we have $$ \mathbb{E}[f(X)] \geq f(\mathbb{E}[X]). $$ [1]: https://en.wikipedia.org/wiki/Jensen%27s_inequality Now $f$ is our call price, and $X$ is our random volatility with $\mathbb{E}[X]=\sigma_0$. The question now...
I'm trying to find a way to price a triple product forward with payoff X*Y*Z at time T using risk-neutral pricing. But I don't really have a math background and I have trouble finding a way to account for correlation with 3 assets. I know that for 2 assets with SDEs: dX= a1dt + b1dz1 dY = a2dt + b2dz2 We h...
What you need is the [Cholesky decomposition][1] of the covariance matrix. In your case, $$ d\begin{pmatrix}X\\Y\\Z\end{pmatrix}=\ldots + Ldz $$ where $L$ is the lower Cholesky matrix. For your $3x3$ example, You can find an [online calculator at Wolfram alpha][2] [1]: https://en.wikipedia.org/w...
What you need is the [Cholesky decomposition][1] of the covariance matrix. For a symmetric matrix $\Sigma$, the Cholesky matrix $L$ has the property $$ \Sigma = LL^T $$ where $L$ is a matrix with zeros above the main diagonal. In your case, $$ d\begin{pmatrix}X\\Y\\Z\end{pmatrix}=\ldots + Ldz $$ ...
MATLAB or Python as starting language?
Suppose I have a process with a stochastic drift: $$X_t=X_0+\int_{h=0}^{h=t}\left(f_1(W_h)\right)dh+\int_{h=0}^{h=t}\left(f_2(W_h)\right)dW_h$$ Above, $f_1$ and $f_2$ are some functions of $W_t$. In general, a process cannot be a martingale, if it has a drift. What if the expected value of the stochastic drift...
let's say I have a real stochastic process $dX_t=dt+\frac{1}{B_t}dB_t$ on $[0,T]$, with $B_t$ Brownian in $\mathbb{P}$ (not centered in 0) in $[0,\tau]$ with $\tau$ some adequate stopping time that makes everything good and smooth. My exercise asks to find another prob. measure $\mathbb{Q}$ such that under this mea...
A question in my course hasn't given us much to go on. I'm not sure if there is a specific model I could use to determine which project is the better one. 1st option costs 350.000, has a life expectancy of 7 years and the benefits it will provide have been evenly distributed. 2nd option has a cost of 450.000, a li...
If NDF contract gets novated, will it change the pricing? If NDF contract gets novated, will it change the pricing?
After observing swap spreads in the market, I have noticed that the swap spread curve is downward sloping. Why is this? I have tried looking around the internet for answers, but have not found anything. The only rational I could think of is that corporate issuers, who want to receive fixed on swaps to hedge their B...
In general - for other countries - of course not. But in case of Brazil, you are lucky. Brazil is more advanced than most other countries in this regard. All the debentures are exchange-listed and easy to find. You can see all the debentures, for example, on https://data.anbima.com.br/debentures or http://www.debent...
My question is about factor investing. In most equity markets (Europe, US) the factors momentum and low volatility have outperformed the cap weighted indices in the last couple of years while the value factor - which in my perception was still "fashionable" as investment style ("we are value-investors...") - underperfo...
While historically the return, volatility and correlation characteristics justified the inclusion of Sovereign Bonds (US Treasuries, European Central Bank Debt, etc) in Strategic Asset Allocation decisions of real money investors (such as Pension Funds), are they justified in today's investing environment? With Sove...
While historically the return, volatility and correlation characteristics justified the inclusion of Sovereign Bonds (US Treasuries, European Central Bank Debt, etc) in Strategic Asset Allocation decisions of real money investors (such as Pension Funds), are they justified in today's investing environment? With Sove...
We know that the **portfolio expected return** is a weighted sum of the individual assets' expected returns (asset means). We also know that the **portfolio variance** is a weighted combination of the individual assets' volatilities. Is the **portfolio return distribution** $\text{P}(Xw)$ likewise a weighted combina...
Is the portfolio return distribution a weighted combination of individual asset return distributions?
We know that the **portfolio expected return** is a weighted sum of the individual assets' expected returns (asset means). We also know that the **portfolio variance** is a weighted combination of the individual assets' volatilities. More specifically, it's a quadratically weighted functional of the volatilities and co...
I have repeatedly come across a statement that **"a process with a drift cannot be a martingale".** Is this true also for stochastic drifts? Suppose I have a process with a stochastic drift: $$X_t=X_0+\int_{h=0}^{h=t}\left(f_1(W_h)\right)dh+\int_{h=0}^{h=t}\left(f_2(W_h)\right)dW_h$$ Above, $f_1$ and $f_2$ are...
Can a Process with a Stochastic Drift be a Martingale?
If I look at the market I think this is mainly driven by the very nature of the long end investors of the swap curve. Compared to govi curves the swap curves provides a much better liquidity even in longer tenors. Although we have seen a trend of bringing longer dated bonds to the market by government, too. Austria and...
I have repeatedly come across a statement that **"a process with a drift cannot be a martingale".** Is this true also for stochastic drifts? Suppose I have a process with a stochastic drift: $$X_t=X_0+\int_{h=0}^{h=t}\left(f_1(W_h)\right)dh+\int_{h=0}^{h=t}\left(f_2(W_h)\right)dW_h$$ Above, $f_1$ and $f_2$ are...
---- **Prelude** A valuation tree introduces a lattice structure for derivatives valuation. To not overburden notation, let us define the tree by $K$, the number of nodes exiting each state, corresponding probabilities $p_1,p_2,\ldots,p_K$ for each jump of size $J_k$, $k=1,\ldots,K$; and of course $N$, the number o...
Unfortunately, there exist no closed form for this. The Lagrangean reads $$ L(w,\lambda)=w^TM_3(w\otimes w)-\lambda(w^T\mathbf{1}-1) $$ with first order conditions $$ \begin{align} \frac{\partial L }{\partial w_i}&=3w^TM_{3,i}w-\lambda \quad \forall i \\ \frac{\partial L }{\partial \lambda}&=w^T\mathbf...
As @Martin has pointed out in his answer, of course it is. Let $X=\sum_{i=1}^N w_ix_i$ denote the return of a portfolio of $N$ assets with multivariate distribution $f(x_1,x_2,\ldots,x_N)$. The distribution of $X$ may be found by $(N-1)$-fold [convolution][1] of the $N$-dimensional distribution $f$. Unfortunate...
We know that the **portfolio expected return** is a weighted sum of the individual assets' expected returns (asset means). We also know that the **portfolio variance** is a weighted combination of the individual assets' volatilities. More specifically, it's a quadratically weighted functional of the volatilities and co...
I have repeatedly come across a statement that **"a process with a drift cannot be a martingale".** Is this true also for stochastic drifts? Suppose I have a process with a stochastic drift: $$X_t=X_0+\int_{h=0}^{h=t}\left(f_1(W_h)\right)dh+\int_{h=0}^{h=t}\left(f_2(W_h)\right)dW_h$$ Above, $f_1$ and $f_2$ are...
Forecasts for the S&P 500?
I have repeatedly come across the statement that **"a process with a drift cannot be a martingale".** Is this true also for stochastic drifts? Suppose I have a process with a stochastic drift: $$X_t=X_0+\int_{h=0}^{h=t}\left(f_1(W_h)\right)dh+\int_{h=0}^{h=t}\left(f_2(W_h)\right)dW_h$$ Above, $f_1$ and $f_2$ a...
If I look at the market I think this is mainly driven by the very nature of the long end investors of the swap curve. Compared to govi curves the swap curves provides a much better liquidity in longer tenors. Although we have seen a trend of bringing longer dated bonds to the market by government, too. Austria and Belg...
I'm trying to estimate the volatility surface of an especially illiquid options market; only ATM quotes are available (so Vanna-Volga approximation is not viable) for options on **quarterly** futures for the next year -- but I am working with ITM and OTM **daily** options that go on for the next seven years. So my ques...
I know how to build Zero Curve using Swap Curve when today's are reset date. Because, In the reset date, Floating rate bond's value is exactly par value. So we can make equation with Fixed rate bond! However, the problem is when it is not reset date. Let's look at the problem with quote [![USDIRS][1]][1] ...
How to bootstrap zero curve using swap curve when Today's are not reset date?
I came across a paper that shows calculations for two types of portfolio risk contribution. The first shows "Asset risk contributions" and the second shows "Correlation-weighted asset risk contributions" as so: I x (W x (V x C x V x w)) and C x (W x (V x C x V x w), respectively where: x denotes matrix multiplica...
After observing swap spreads in the market, I have noticed that the swap spread curve is downward sloping. Why is this? I have tried looking around the internet for answers, but have not found anything. The only rational I could think of is that corporate issuers, who want to receive fixed on swaps to hedge their B...
I'm writing a paper where I am using expected federal funds rates at different horizons and wanted to use the OIS as a proxy for what the market expects the FFR to be post FOMC-meetings. However, I can't seem to find the data anywhere. Does anyone know where I can get these and if not, what else I can use as proxies ab...
I came across a paper that shows calculations for two types of portfolio risk contribution. The first shows "Asset risk contributions" and the second shows "Correlation-weighted asset risk contributions" as so: $I \times (W \times (V \times C \times V \times w))$ and $C \times (W \times (V \times C \times V ...
Ok, on the advice of administration I open a new question, hoping that in this way it becomes clearer. Like I said before, I am trying to understand how the authors of [this][1] (page 76) and [this][2] (page 31) works arrive to the condition $\left \| C(\widetilde{R}_1- \check{R}_1) \right \|\leq \Gamma$, with: ...
Ok, on the advice of administration I open a new question, hoping that in this way it becomes clearer. Like I said before, I am trying to understand how the authors of [this][1] (page 76) and [this][2] (page 31) works arrive to the condition $\left \| C(\widetilde{R}_1- \check{R}_1) \right \|\leq \Gamma$, with: ...
I understand you use T/N swaps to rollover FX positions and so avoid physical delivery but I dont quite get how this happens in reality. For example, if I am long EURUSD and need to deliver/sell USD at t+2, to avoid this I can use a T/N swap, so what would I swap with?
What does it mean In FX trading you using a T/N swap to avoid physical delivery of the currency?
Why a probability distribution can be viewed as a price?
**Question** I have been toying around to get some understanding of what the stochastic discount factor look likes in Black-Scholes-Merton and how it relates to the exponential process in Girsanov's theorem. I find that the stochastic discount factor is the exponential process in Girsanov's Theorem discount at the r...
What is the link between the SDF in the Black-Scholes-Merton model and the exponential process in Girsanov's theorem?
Say that we have the following environment: \begin{align} dS_t &= \mu S_t dt + \sigma S_t dZ_t \\ dB_t &= r B_t dt \end{align} where $S_t$ is the price of a stock, $B_t$ is the price of a risk-free bond and $\left( Z_t \right)_{t \geq 0}$ is a standard Brownian motion. It's easy enough to get the densities f...
## Intuition ## The stochastic discount factor (SDF) really has two jobs to do: it needs to incorporate the time value of money (discount) and take the riskiness of cash flows into account (stochastic). Thus, it can make sense to split the SDF into its two components, $$M_t=e^{-rt}A_t,$$ where $A_t$ does the risk comp...
Consider an option expiring in 12/31/2023 on an hourly swap from 2024 through 2029 such that: a) I pay the floating price of electricity and b) receive $20 in return. Using shaped monthly futures and an hourly generation schedule, I have calculated a VWAP, which I will use as the futures price in the Black-76 formula. ...
Which volatility should I use in a long-term futures swaption?
where is the best place to get spx data, all the trades with exact millisecond timestamps a few weeks back? I don't mind paying for such a service
Short puts are synthetically equivalent to covered calls (same series). They both have an asymmetric risk/return profile. You limit the upside while retaining all of the downside risk. That translates into a poor R/R profile. Two old expressions about selling covered calls (or short puts) are: - It's like colle...
Very basic questions. Let $(z_t)_{t \geq 0}$ be a standard Brownian motion and let $$dS_t = \mu S_t dt + \sigma S_t dz_t.$$ When we write $E\left( S_t \right)$, do we mean $E\left( S_t \big| F_0 \right)$? The hesitation stems from my habit with discrete time processes which, in levels, would not be covariance stati...
Suppose that $ G $ is a function of the underlying asset $ S $, which follows a geometric Brownian motion. Suppose that $ \sigma_{S} $ and $ \sigma_{G} $ are the volatilities of $ S $ and $ G $, respectively. Show that if $ \mu $, the rate of return of $ S $, increases by a constant $ \lambda $, then the rate of return...
I was reading some pages in *Professional Automated Trading* by Eugene Durenard when I came across this chart: [![enter image description here][1]][1] The caption says: "S&P Absolute Return Distribution: Log-Log Scale". The brief description in the text says: > [The] log-log scale shows the fat tails and a ...
What does this absolute return distribution chart show?
https://www.nyse.com/market-data/historical/daily-taq Is usually the best place for the trades and all the quotes for those trades. It can be expensive. There are other services that provide subsets of the data too. https://quantpedia.com/links-tools/?category=historical-data mabe be of some use
Is someone aware of pubblications that try to model limit order book (and market mircostructure) in general using CS tools (such as online machine learning, game theory ecc...) and not stochastic processes? I am aware of the work by [Kearn][1] (et al.) [1]: https://www.cis.upenn.edu/~mkearns/
Is someone aware of publications that try to model limit order book (and market mircostructure) in general using CS tools (such as online machine learning, game theory ecc...) and not stochastic processes? I am aware of the work by [Kearn][1] (et al.) [1]: https://www.cis.upenn.edu/~mkearns/
## Intuition ## The stochastic discount factor (SDF) really has two jobs to do: it needs to incorporate the time value of money (discount) and take the riskiness of cash flows into account (stochastic). Thus, it can make sense to split the SDF into its two components, $$M_t=e^{-rt}A_t,$$ where $A_t$ does the risk comp...
The very last step of the Fama McBeth procedure is to aggregate the estimated regression coefficients by taking their mean. The mean is then the estimate for the "overall" regression coefficient. The significance of this mean is derived by looking at the variation of the regression coefficients. But by doing so, do...
I found that all of the electricity futures prices (on ICE) at a particular hub changed on December 2, even though a) most had zero open interest and zero volume, and b) the quoted prices are EOD settlement prices. How can this be? Does that mean that, since there is no market, the prices are unreliable? Or does it mea...