instruction
stringlengths
15
26.1k
In Stigum's money market book, in the chapter on repo, he talks about 'reversing in a security'. Then later on he quotes a portfolio manager sayin 'I reverse out securities to dealers, but I never refer to it around the company as 'lending out' our valuable securities.' I feel like there is an abuse of language here, b...
I have developed a fully automated crypto trading strategy for which has been showing promising results and I am now looking to raise money to expand and hopefully trade to its full capacity in the future. My analysis on the backtest results shows there is a small possibility of of 40-50% drawdown (probably once a ye...
Based on the definitions of A, B, C, and D in "[An Analytic Derivation Of The Efficient Portfolio Frontier](<http://www.stat.ucla.edu/~nchristo/Fiatlux/analytic_derivation_frontier.pdf>)" by Robert Merton (1972), how can I prove the following in a line-by-line derivation? $cov({x}_{p},{x}_{q}) = {x}_{p} \Omega {x...
By no-arbitrage, the price of a vanilla European call with $K=0$ should be that of the underlying stock (as selling the call is perfectly hedged by buying the stock). However, is this true in practice? More concretely, if you ran an options desk and I called you asking me to make me a market on $50M worth of 0-strik...
Practically, are the prices of 0-strike European calls and stock identical?
By no-arbitrage, the price of a vanilla European call with $K=0$ should be that of the underlying stock (as selling the call is perfectly hedged by buying the stock). However, is this true in practice? More concretely, if you ran an options desk and I called you asking me to make me a market on $50M worth of 0-strik...
My understanding of the traditional Markowitz portfolio optimization process is as follows: Lets say I have data from year 1 to year 10. At the end of year 10 (having information about year 10), I want to optimize portfolio weights for the year 11. I derive my optimal portfolioweights conditional on some utility fun...
I need to price a bond using yield to maturity from the yield curve (YC). The bond in issued by a german company in USD. My question is what yield curve should I use, is it the US treasury YC or should I use the EUR YL of germany? Thank you.
Mean of diffusion term not zero using NORMINV?
I need to price a USD bond using yield-to-maturity from the yield curve (YC). The bond is issued by a German company. My question is what yield curve should I use: the US Treasury YC or the EUR YC of Germany? Thank you.
I am trying to value an american call option with a lookback feature. So the holder can choose to exercise either based on a fixed strike (K) or a floating strike equal to 10-day moving average (MA). I tried to build a tree model but results look weird and I couldn't figure out where the problem is. What I did is to co...
When comparing performance of equities (for example S&P 500) versus credit indices (for example US HY) people often adjust equity returns by its beta relative to credit. Can someone please explain what’s the reason? For example, if you do invest in both securities your overall return will be return on equity inve...
I'm new to Quantlib in Python and I'm running into a quite awkward situation. I have a vol surface from the market on the SPX index. Not all strikes/maturities are populated. In addition, there could potentially be arbitrages in short maturities since we have lots of daily options and I am not correcting yet for arb...
I'm new to Quantlib in Python and I'm running into a quite awkward situation. I have a vol surface from the market on the SPX index. Not all strikes/maturities are populated. In addition, there could potentially be arbitrages in short maturities since we have lots of daily options and I am not correcting yet for arb...
When modelling stocks we specify the model in terms of the dynamics of the stock itself (e.g. in Black-Scholes, Heston and SABR - often denote $S$). However, as I am reading about Term Structure Models many sources start with the dynamics of the short rate (often denote $r$) or state price vector (often denote $X$)....
If you specify separate stochastic processes for bonds with different maturities, the resulting model is typically not arbitrage free. Solving the bond prices by instead specifying a short rate process under the risk neutral measure is a convenient way to guarantee the term structure is arbitrage free. Note that this, ...
If you specify separate price processes for bonds with different maturities, the resulting model is typically not arbitrage free. Solving the bond prices by instead specifying a short rate process under the risk neutral measure is a convenient way to guarantee the term structure is arbitrage free. Note that this, howev...
When modelling stocks we specify the model in terms of the dynamics of the stock itself (e.g. in Black-Scholes, Heston and SABR - often denoted $S$). However, as I am reading about Term Structure Models many sources start with the dynamics of the short rate (often denoted $r$) or state price vector (often denoted $X...
I am reading the risk metrics technical document found [here](https://www.msci.com/documents/10199/5915b101-4206-4ba0-aee2-3449d5c7e95a) and I am wondering what the effective days of a EWMA model would be if I take the lag 2 percentage change. More specifically in page 93-95 in the link the document states that the eff...
I'm using QuantLib (python version) for options pricing, and am trying to figure out how to handle non integer dates. If you try and price an option at 9:30 AM and at 4 PM, you should get different prices, but I don't know what the best way to handle this in QuantLib would be. You could perhaps try running it with ...
If you specify separate price processes for bonds with different maturities, the resulting model is typically not arbitrage free. Solving the bond prices by instead specifying a short rate process under the risk neutral measure is a convenient way to guarantee that there are no arbitrage opportunities. How about th...
I am reading the risk metrics technical document found [here](https://www.msci.com/documents/10199/5915b101-4206-4ba0-aee2-3449d5c7e95a) and I am wondering what the effective days of a EWMA model would be if I take the lag 2 percentage change. More specifically in page 93-95 in the link the document states that the eff...
My understanding of the traditional Markowitz portfolio optimization process is as follows: Let’s say I have data from year 1 to year 10. At the end of year 10 (having information about year 10), I want to optimize the portfolio weights for the year 11. I derive my optimal portfolio weights conditional on some utili...
I have been reading the book "[RiskMetrics —Technical Document](https://www.msci.com/documents/10199/5915b101-4206-4ba0-aee2-3449d5c7e95a)" by Longerstaey (J.P.Morgan) and Spencer (Reuters) (4th Edition, 1996). I am wondering what the effective days of the exponentially weighted moving average model (EWMA) mentioned in...
Let's say that we have a discrete probability distribution, where $$ x_i $$ represents the each of the possible outcomes (discrete set of possible outcomes), and $$ L $$ represents the expected value we want to achieve, by manipulating the original probability distribution (keeping the same values of x_i, but adj...
What is the meaning of the following mathematical equations?
Let's say that we have a discrete probability distribution, where $$ x_i $$ represents each of the possible outcomes (discrete set of possible outcomes), and $$ L $$ represents the expected value we want to achieve, by manipulating the original probability distribution (keeping the same values of x_i, but adjusti...
The accepted [answer](https://quant.stackexchange.com/a/22263/64701) to a similar question states: >A simple linear interpolation on implied variance along iso-moneyness lines is enough to garantee that there is no arbitrage between maturities as long as the inputted market data is arbitrage free. In my case, I hav...
Suppose I have a large factor model for security returns, i.e. I have a vector $\mathbf{Y}(t) \in \mathbb{R}^{P}$, with factor loadings $\mathbf{\beta} \in \mathbb{R}^{P \times K}$ over a set of $K$ factors denoted by $\mathbf{X}$. Thus, we can describe the asset returns as \begin{align} \mathbf{Y}(t) = \mathbf{\be...
Suppose I have a large factor model for security returns, i.e. I have a vector $\mathbf{Y}(t) \in \mathbb{R}^{P}$, with factor loadings $\mathbf{\beta} \in \mathbb{R}^{P \times K}$ over a set of $K$ factors denoted by $\mathbf{X}$. Thus, we can describe the asset returns as \begin{align} \mathbf{Y}(t) = \mathbf{\be...
The (call) price is undefined for $K=0$. You can only speak about the price as $K \downarrow 0$. Not the same thing as $\infty$ is not a number. **EDIT:** Following the question of @Kermittfrog, some more clarification. First of all, assume that the stock price is a *positive* price process. By definition ...
The (call) price is undefined for $K=0$. You can only speak about the price as $K \downarrow 0$. Not the same thing as $\infty$ is not a number. **EDIT:** Following the question of @Kermittfrog, some more clarification. First of all, assume that the stock price is a *positive* price process. By definition ...
I would like to understand the fundamental difference between yield and discount yield, specifically relating it to zero coupon treasury bills. Please see image below: [![enter image description here][1]][1] For those who are terminal users, the image shows YAS_BOND_YLD vs YLD_YTM_BID. The convention for...
Is "extreme CVaR" (CVaR from extreme value theory) elicitable or conditionally elicitable with some other statistical mapping (like VaR)?
I have been reading the book "[RiskMetrics —Technical Document](https://www.msci.com/documents/10199/5915b101-4206-4ba0-aee2-3449d5c7e95a)" by Longerstaey (J.P.Morgan) and Spencer (Reuters) (4th Edition, 1996). I am wondering what the effective days of the exponentially weighted moving average model (EWMA) mentioned in...
According to [the accepted answer](https://quant.stackexchange.com/a/22263/64701) to a question in this site on the interpolation in the term structure of volatility surface: >A simple linear interpolation on implied variance along iso-moneyness lines is enough to guarantee that there is no arbitrage between maturitie...
Is there an easy way to add weekends to a BespokeCalendar calendar instance?
First of all, I am aware of the highly related question [What is an efficient data structure to model order book?][1], but my question is a bit different here. I want to save the order book states after the arrival of each message, which includes add, cancel and trades. For example, assume we're using a B-Tree with...
What is an efficient data structure to save order book states?
Let us look at options, which are cash settled, but instead of receiving cash, you receive the proportion from underlying asset with the same value as cash. Moreover, you can pay for these options in underlying asset only. **Example:** ETH option expired with strike price \$1000 and the current value of ETH is \$2...
Regarding the industry portfolio as created by Kennth R. French like here: https://mba.tuck.dartmouth.edu/pages/faculty/ken.french/Data_Library/det_17_ind_port.html I was wondering how I could do this for other markets. They specifically use SIC codes but for other countries I can't find a comparable classification whi...
How to create Industry Portfolios per country?
What is the approach for pricing open-ended constant leverage certificates, like this [Bull DAX 20x](https://certificates.vontobel.com/SE/EN/Product/DE000VV3WRR3?ReturnUrl=%2fSE%2fEN%2fProducts%2fProduct_search%2fbull-and-bear-matrix&FromPath=Produkter--Produkts%c3%b6k--Bull+%26+Bear+Matris--)? As the instrument is ...
From Trading Volatility Book : >A rule of thumb is that the value of the OTM put sold should be approximately one-third the value of the long put (if it were significantly less, the cost saving in moving from a put to a put spread would not compensate for giving up complete protection). While selling an OTM pu...
Why is Implied Volatility is more important than skew for put spread pricing?
The iso-moneyness approach guarantees no arbitrage in terms of calendar spreads, but it is not proven it does not introduce some butterfly spreads at some interpolated time. See [Arbitrages in the Volatility Surface Interpolation and Extrapolation][1]. Using iso-delta is sometimes done, not for arbitrage concerns, b...
From Trading Volatility Book : >A rule of thumb is that the value of the OTM put sold should be approximately one-third the value of the long put (if it were significantly less, the cost saving in moving from a put to a put spread would not compensate for giving up complete protection). While selling an OTM pu...
It is said on page 26 of the book "[Trading Volatility: Trading Volatility, Correlation, Term Structure and Skew](https://www.trading-volatility.com)" by Bennett (2014) that: >A rule of thumb is that the value of the OTM put sold should be approximately one-third the value of the long put (if it were significantly...
By no-arbitrage, the price of a vanilla European call with $K=0$ should be that of the underlying stock (as selling the call is perfectly hedged by buying the stock). However, is this true in practice? More concretely, if you ran an options desk and I called you asking me to make me a market on $50M worth of 0-strik...
Suppose I am long equity borrow rates, but I don't know exactly when borrow will increase. What is the most effective way to trade this? The naive strategy of borrowing the stock now and then lending it out once rates jump (assuming the structure/regulations of the securities lending market even allow that) is sub...
How does one get exposure to stock borrow rates?
I am trying to value the open-ended constant leverage certificates like [Bull DAX 20x](https://certificates.vontobel.com/SE/EN/Product/DE000VV3WRR3?ReturnUrl=%2fSE%2fEN%2fProducts%2fProduct_search%2fbull-and-bear-matrix&FromPath=Produkter--Produkts%c3%b6k--Bull+%26+Bear+Matris--). As the certificates are reset daily wi...
What is the maximum (near-)riskless yield that can be "extracted" from holding an equity security? Can this maximum be proven? The naive (obvious?) answer is "the best you can do is lend the stock" but I wonder if we can do better than this in general. One strategy I thought of was to own the stock $S$, enter into a...
What is the maximum yield that can be received from owning an equity?
What is the maximum (near-)riskless yield that can be "extracted" from holding an equity security? Can this maximum be proven? The naive (obvious?) answer is "the best you can do is lend the stock" but I wonder if we can do better than this in general. One strategy I thought of was to own the stock $S$, enter into a...
The EWMA is a weighting scheme. Calculating the EWMA $Z$ of some input signal $X$, the EWMA is defined as: $$ Z_t\equiv (1-\lambda)\sum_{t=1}^T \lambda^{t-1}X_t $$ At closer inspection, we find that, usually, $T<<\infty$, and hence the weights do not sum to 1: $$ (1-\lambda)\sum_{t=1}^T\lambda^{t-1}=(1-\lam...
Why is Implied Volatility more important than skew for put spread pricing?
My understanding of the traditional Markowitz portfolio optimization process is as follows: Let’s say I have data from year 1 to year 10. At the end of year 10 (having information about year 10), I want to optimize the portfolio weights for the year 11. I derive my optimal portfolio weights conditional on some utili...
I am looking for approaches to transform a more complicated stochastic volatility model such as the one shown in Section 2.2 of [Smile Dynamics II](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1493302) to a single-factor model such as the one shown in Section 2.1 of the same paper or some kind of version of Hest...
The well-known **Dupire** local volatility formula is: $$\sigma_{loc}(K,T)^2 =2\frac{\frac{\partial}{\partial T}(C)+rK\frac{\partial}{\partial K}(C)}{K^2\frac{\partial^2}{\partial K^2}(C)}$$ Above, $C$ is the Call option price, and $\sigma_{loc}(K,T)$ is a "local volatility" function which depends on strike and m...
The well-known **Dupire** local volatility formula is: $$\sigma_{loc}(K,T)^2 =2\frac{\frac{\partial}{\partial T}(C)+rK\frac{\partial}{\partial K}(C)}{K^2\frac{\partial^2}{\partial K^2}(C)}$$ Above, $C$ is the Call option price, and $\sigma_{loc}(K,T)$ is a "local volatility" function which depends on strike and m...
The well-known **Dupire** local volatility formula is: $$\sigma_{loc}(K,T)^2 =2\frac{\frac{\partial}{\partial T}(C)+rK\frac{\partial}{\partial K}(C)}{K^2\frac{\partial^2}{\partial K^2}(C)}$$ Above, $C$ is the Call option price, and $\sigma_{loc}(K,T)$ is a "local volatility" function which depends on strike and m...
My question is the following. If the correlation between the log-returns of X and Y is rho, what would be the correlation between the log returns of 1/X and Y ? Thanks for your answers.
I am looking for approaches to transform a more complicated stochastic volatility model such as the one shown in Section 2.2 of [Smile Dynamics II](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1493302) to a single-factor model such as the one shown in Section 2.1 of the same paper or some kind of version of Hest...
You probably have home across recent events in the UK bond markets. [This][1] particular article goes through why BOE decided to intervene. I was curious if someone familiar with LDI could explain the details behind the use of IRS. The article mentions leverage ranging from 1x to 7x (really?) and states the following: ...
I'm trying to calculate the variance $\mathrm{var}\left(\log\frac{S\left(t\right)}{S\left(0\right)}\right)$, where the dynamics of the stock $S$ follows a jump-diffusion process given by $$\frac{dS\left(t\right)}{S\left(t-\right)} = \left(\alpha-\lambda \kappa\right)dt+\sigma dZ\left(t\right)+\left(Y\left(t\right)-1\ri...
The well-known **Dupire** local volatility formula is: $$\sigma_{loc}(K,T)^2 =2\frac{\frac{\partial}{\partial T}(C)+rK\frac{\partial}{\partial K}(C)}{K^2\frac{\partial^2}{\partial K^2}(C)}$$ Above, $C$ is the Call option price, and $\sigma_{loc}(K,T)$ is a "local volatility" function which depends on strike and m...
**Long story cut short**: I am asking why the Local Volatility function can be thought of as a function of the underlying, when in fact it appears to be the function of the strike. **Long story**: The well-known **Dupire** local volatility formula is: $$\sigma_{loc}(K,T)^2 =2\frac{\frac{\partial}{\partial T}(...
In continuous-time asset pricing, the price of a defaultable perpetual coupon bond is given by $$P(V) = \frac{c}{r}\left[ 1- \left(\frac{V}{V_b}\right)^{-\gamma}\right] + (1-\alpha)V_b \left(\frac{V}{V_b}\right)^{-\gamma}$$ where $c$ is the coupon rate, $r$ is the interest rate, $V$ is the underlying asset (distri...
Consider the fundamental asset pricing equation for a perpetual coupon bond: $$rP = c + \mu P' + \sigma^2/2 P''$$ with standard boundary conditions $P(\bar x) = \bar x$ and $\underset{x\rightarrow \infty}{\lim} P(x) = c/r$. $r$ is the interest rate and $c$ is the coupon rate, the other parameters are drift and vola...
**Long story cut short**: I am asking why the Local Volatility function can be thought of as a function of the underlying, when in fact it appears to be the function of the strike. **Long story**: The well-known **Dupire** local volatility formula is: $$\sigma_{loc}(K,T)^2 =2\frac{\frac{\partial}{\partial T}(...
You probably have home across recent events in the UK bond markets. The Financial Times article "[The reason the BoE is buying long gilts: an LDI blow-up](https://www.ft.com/content/038b30c3-f550-4cc0-93ed-9154021d6ee2)" from Sep. 28, 2022 goes through why the BOE decided to intervene. I was curious if someone fami...
I'm trying to calculate the variance $\mathrm{var}\left(\log\frac{S\left(t\right)}{S\left(0\right)}\right)$, where the dynamics of the stock $S$ follows a jump-diffusion process given by $$\frac{dS\left(t\right)}{S\left(t-\right)} = \left(\alpha-\lambda \kappa\right)dt+\sigma dZ\left(t\right)+\left(Y\left(t\right)-1\ri...
Consider the fundamental asset pricing equation for a perpetual coupon bond: $$rP = c + \mu P' + \sigma^2/2 P''$$ with standard boundary conditions $P(\bar x) = \bar x$ and $\underset{x\rightarrow \infty}{\lim} P(x) = c/r$. $r$ is the interest rate and $c$ is the coupon rate, the other parameters are drift and vola...
What is the maximum (near-)riskless yield that can be "extracted" from holding an equity security, assuming markets are efficient? (I distinguish "yield" from "gains in the stock's value"; the latter of these doesn't count. Equivalently I'm asking about maximum yield above baseline equity returns.) Can this maximum be ...
Suppose I lend you an equity security for ten years, interest-free, and you have to return it to me at the end of term (which means little-to-no risk-taking). What is the maximum (near-)riskless yield that can be "extracted" from holding the stock, in the absence of alpha? (I distinguish "yield" from "gains in the stoc...
If a company has a default in one of its bonds, but not the reference obligation referenced in the CDS, does that constitute a default? Also, if there is settlement via physical delivery, does the ref obligation have to be delivered or can another bond be delivered? Or is physical delivery not done anymore and its ...
Consider the one-dimensional diffusion process $dX_t = \mu_tdt + \sigma_tdB_t$ and function $f : \mathbb{R} \to \mathbb{R}$, which is twice differentiable. Here we have another SDE by using Itô lemma as follows; $$ d f\left(t, X_t\right)=\left(\frac{\partial f}{\partial t}+\mu_t \frac{\partial f}{\partial x}+\frac{\s...
<h1>My Answer</h1> You should set your limit order to: $s (v+1)^{-0.0314192 \sqrt{t}}$ where $s$ is the current price, $t$ is the time in years you're willing to wait, and $v$ is the annual volatility as a percentage. If you want to be $p$ percent sure (instead of 0.98), set your limit order to: $s (v+1)^{-...
I'm trying to calculate the variance $\mathrm{var}\left(\log\frac{S\left(t\right)}{S\left(0\right)}\right)$, where the dynamics of the stock $S$ follows a jump-diffusion process given by $$\frac{dS\left(t\right)}{S\left(t-\right)} = \left(\alpha-\lambda \kappa\right)dt+\sigma dZ\left(t\right)+\left(Y\left(t\right)-1\ri...
I'm in search of a way to calibrate a very simple Hull-White model with a constant volatility and a constant mean-reversion speed, purely based on historical zero rates. $$dr(t) = (\theta(t) - \alpha r(t))dt + \sigma dW(t)$$ My intuition tells me that I can use the relationship between historical 1Y zero rate- an...
I'm interested in deriving the par rate of an interest rate swap priced under the single curve framework. Let's follow the corresponding [Wikipedia article][1] for the sake of notation simplicity. The present value of the fixed leg can be calculated as $$PV_{fixed} = NR\sum_{i=1}^{n_1}d_i x_i,$$ where $N$ is the n...
I have a very strong interest in the use of GPUs in quantitative finance, and am in search of algorithms/simulations/models that can have their runtime heavily reduced by GPU computation. What models, or segments of models, do you think might be interesting to explore with regards to runtime and parallelization? ...
Speeding up Cutting Edge Quantitative Models on GPUs?
Before Google Finance changed its service, I remember I used to be able to see news or technical events on historical charts. It was beneficial for me as I was able to see the impact of the news event on the price. AFAIK, Google Finance does not provide the feature anymore. Is there any alternative option that...
How should you price Quanto option, where domestic = underlying? Example: Let's say I want to price Quanto option in EUR on EUR/USD pair, but the option is settled in EUR. Should I use normal Quanto option formula with $-1$ correlation? (Due to the fact that the USD/EUR is $-1$ correlated to EUR/USD)
How should you price Quanto option, where domestic = underlying? Example: Let's say I want to price Quanto option in EUR on EUR/USD pair, but the option is settled in EUR. Should I use normal Quanto option formula with $-1$ correlation and same sigma? (Due to the fact that the USD/EUR is $-1$ correlated to EUR/US...
I'm selling a call option and buying a delta amount of the underlying (calculated using implied vol). Now I know in the limit case of continuous hedging I end up paying a PnL which is a gamma weighted integral of volatility differences, but in discrete hedging (daily) backtest, I'm getting slightly positive PnL's. I'm ...
How do you explain consistently making money with discrete hedging a call option?
In a simulation I did, I'm selling a call option and buying a delta amount of the underlying (calculated using implied vol). Now I know in the limit case of continuous hedging I end up paying a PnL which is a gamma weighted integral of volatility differences, but in discrete hedging (daily) backtest, I'm getting slight...
In a backtest I did, I'm selling a call option and buying a delta amount of the underlying (calculated using implied vol). Now I know in the limit case of continuous hedging I end up paying a PnL which is a gamma weighted integral of volatility differences, but in discrete hedging (daily) backtest, I'm getting slightly...
In a backtest I did, I'm selling a call option and buying a delta amount of the underlying (calculated using implied vol). Now I know in the limit case of continuous hedging I end up paying a PnL which is a gamma weighted integral of volatility differences, but in discrete hedging (daily) backtest, I'm getting slightly...
**This post is Quant Stack Exchange's master list of data sources.** Please append your links to other data sources to the list below. ## Economic Data ## See [What are the most useful sources of economics data?][1] on Cross Validated SE. **World** - <https://macrovar.com/macrovar-database/> includes free...
What does non stochastic limiting shrinkage function mean?
I'm reading the paper "[The Power of (Non-)Linear Shrinking: A Review and Guide to Covariance Matrix Estimation][1]" by Ledoit and Wolf (2020). When a function that is used to transform the sample eigenvalues to the diagonal entries of a matrix is being discussed on page 19, it is stated that it converges to a "non-s...
What does a non-stochastic limiting shrinkage function mean?
All I noticed that in the pair trading, some measure the spread on pricing and some measure the spread on return. Both methods make sense, it is intuitve to model price, but convergence of return means long stronger return and short weaker return which also leads to profit. Has anyone compared the benefit of pair...
In pair trading, we should look into the spread of price or return?
I'm calculating the parameters of the papers below. - [Olivier Gu´eant · Charles-Albert Lehalle · Joaquin Fernandez-Tapia][1] For example, Let $ A = 0.9 $ $ k = 0.3 $ $ \sigma = 0.3 $ $ \gamma = 0.01 $ $ q = 0 $ then, by the closed form solution of optimal control. - $ \delta_{\infty}^{b...
What is "UNIT" of parameters of Avellaneda and Stoikov model?