instruction stringlengths 15 26.1k |
|---|
John Cochrane states, that if the covariance between the stochastic discount factor and the payoff is zero - then risk aversion should have no impact on the pricing. I do not fully understand why this is the case. Since in the pricing formula P = E(Mx) with M as the SDF and x as they payoff if I have a different risk a... |
I'm confused about the math for the delta-neutral portfolio.
Assume we have a short position in a European call option with price $p(t,S_t)$ and want to hedge it with the stock with price $S_t$. The portfolio value is $X(t,S_t)=-p(t,S_t)+\Delta\times S_t$. To make the portfolio delta neutral we require the portfoli... |
stackexchange,
I am currently programming a script to use on the Bitmex API.
In algo trading a lot can happen to cause an error in the script, so my question to you all was if I missed a safety and what kind of safeties y'all are using?
This is the list of safeties and optimizations that I am using:
1. Use... |
What order safeties are there? |
The biggest risk as I've seen is from falling to loops. Make sure to check the quantities of orders, cancels, replaces. Have hard-breaks on any exceptions to those quantities.
For your risk can you have a separate process that listens to fills? It's good practice to have a separate risk engine that can kill th... |
John Cochrane states, that if the covariance between the stochastic discount factor and the payoff is zero - then risk aversion should have no impact on the pricing. I do not fully understand why this is the case. Since in the pricing formula P = E(Mx) with M as the SDF and x as they payoff if I have a different risk a... |
I'm confused about the math for the delta-neutral portfolio.
Assume we have a short position in a European call option with price $p(t,S_t)$ and want to hedge it with the stock with price $S_t$. The portfolio value is $X(t,S_t)=-p(t,S_t)+\Delta\times S_t$. To make the portfolio delta neutral we require the portfoli... |
Where can I find derivation of formula for portfolio skewness and kurtosis? I can find formulas everywhere, but not their derivations?
For example, the portfolio variance formula, $\sigma_P = w^\top \Sigma w$ is well known, where $\Sigma$ is the covariance matrix, and I can find the derivation of that formula in a l... |
How to add the effect of skewness in the portfolio optimisation objective function? |
I am trying to simulate using a Geometric Brownian Motion process three autocorrelated stocks.
In particular, I need to simulate **three different matrices** with 1000 scenarios each using a Monte Carlo technique. How could I simulate them in order to be autocorrelated using R Studio?
I saw some posts where it is... |
We have a contract whose value is $A(S_t,t) = S_t^3$ at all times, not just at expiration. $S_t$, the underlying stock, follows a Geometric Brownian Motion, $\frac{dS}{S} = \mu dt + \sigma dB$. How would we go about showing that this is inconsistent with no-arbitrage pricing?
I thought a potential solution could... |
I have the following,
> Let ${F_t,t\geq0}$ be the price process of the forward contract on the
> risky asset with maturity $T' > 0$. Since interest rates are
> deterministic, we have
>
> $$F_t=S_t\ e^r(T^\prime-t)\ =F_0\ e^{-\frac{1}{2}\sigma^2t+\sigma B_t}$$
Why do we have $-\frac{1}{2}\sigma^2t+\sigma B_t$... |
I have been looking into pairs trading strategies (stationary linear combination of multiple securities) for options. Multiple related options or option and underlying over small periods of time such that change in delta and time decay don't become a significant factor.
I can not find any literature around this for... |
Pairs trading on two options or option and underlying? |
in papres such as https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2686284 a state space model is applied to the term structure of the CDS. what are the variables that make up the state variables?
How can I calibrate the uscented kalman filter?
Have you some matlab examples?
Thanks |
I'm starting to sell ATM options in order to buy the tails, and I would like to know how to use gamma/theta or theta/gamma ratio or sum to manage and exit the short position before the gamma risk maximum point. Have someone any idea of how to use and interpret those ratios or sums? |
How to use gamma theta and theta gamma ratios for manage short positions? |
in papres such as https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2686284 (Exploring Mispricing in the Term Structure of CDS Spreads by Robert A. Jarrow, Haitao Li, Xiaoxia Ye, and May Hu) a state space model is applied to the term structure of the CDS. what are the variables that make up the state variables?
Ho... |
At page 64 of the book *Concepts and practice of mathematical finance, 2nd edition* by M. Joshi, paragraph 3.7.2 (Trees and option pricing - A log-normal model - The risk-neutral world behaviour) a quick exercise is presented:
> Show that $$ \mathbb{E}( \exp(\sigma \sqrt{T} N(0,1) ) ) = \exp(0.5 \, \sigma^2 T) $$
w... |
The key here is in finding that $-$ for our application in finance $-$, the Kronecker product notation is 1) a way to shorten notation and 2) a function that is well represented in mathematical toolboxes such as ```Matlab```or ```R```.
Assume there are $N=3$ random returns ($x_1,x_2,x_3$) and some weight vector $w$ ... |
I am currently trying to replicate the Black-Scholes price of a call option using stochastic simulations of the price moves of the underlying. My code is as follows:
import numpy as np
import matplotlib.pyplot as plt
import math
from scipy import stats
class MarketReturnModel(obje... |
Why am I struggling to replicate the Black-Scholes price of an option stochastically? |
I am currently trying to replicate the Black-Scholes price of a call option using stochastic simulations of the price moves of the underlying. My code is as follows:
import numpy as np
import matplotlib.pyplot as plt
import math
from scipy import stats
class MarketReturnModel(obje... |
I have the following,
> Let ${F_t,t\geq0}$ be the price process of the forward contract on the
> risky asset with maturity $T' > 0$. Since interest rates are
> deterministic, we have
>
> $$F_t=S_t\ e^{r(T^\prime-t)}\ =F_0\ e^{-\frac{1}{2}\sigma^2t+\sigma B_t}$$
Why do we have $-\frac{1}{2}\sigma^2t+\sigma B_... |
Is it possible to apply the idea of GARCH to time series models that include exogenous variables?
For example, say I estimate a cash flow forecast model. Does it make sense to model the residuals by use of a GARCH model? Or formulated alternatively: Does it make sense to try to forecast volatility in cash flow fore... |
Can you apply GARCH to ARIMAX models? |
I'm starting to sell ATM options in order to buy the tails, and I would like to know how to use gamma/theta or theta/gamma ratio or their sum to manage and exit the short position before the gamma risk reaches maximum point. Does anybody have any idea how to use and interpret those ratios or sums? |
How to use gamma theta and theta gamma ratios for manageing short positions? |
How to use gamma theta and theta gamma ratios for managing short positions? |
The key here is in finding that $-$ for our application in finance $-$, the Kronecker product notation is 1) a way to shorten notation and 2) a function that is well represented in mathematical toolboxes such as ```Matlab```or ```R```.
Assume there are $N=3$ random returns ($x_1,x_2,x_3$) and some weight vector $w$ ... |
*I can not find any literature around this for options...Is there any particular reason for not pair trading options?*
There is pair trading in options but from what I've seen for equities (and rates and FX) it's discretionary rather than systematic. Examples: VIX vs. VSTOXX was a popular trade for a long time; SPX ... |
I've coded up a binomial tree version of the "Known Dollar Dividend" part of section 21.3 of Hull 10th Edition. I reproduce the answer in the book's example and also reproduce correctly a few spot-checked option prices in Bloomberg for which there's an upcoming dividend. I think I have a mistake, however, because I g... |
I'm trying to reconcile an interesting brain teaser I was recently posed and I need help understanding the flaw in the reasoning.
The problem states there is an asset which after an announcement has an 80% probability of going to 100 and a 20% probability of going to 50. What is the value of an at the money call... |
My t-copula model captures the daily dollar returns of a portfolio of approximately 400 assets. I am curious if there's a generally accepted way to quantify the sensitivity of portfolio movements with respect to the underlying correlation matrix. My first instinct is to try a discrete approximation, such that If C is m... |
My t-copula model captures the daily dollar returns of a portfolio of approximately 400 assets. I am curious if there's a generally accepted way to quantify the sensitivity of portfolio movements with respect to the underlying correlation matrix. My first instinct is to try a discrete approximation, such that If C is m... |
I would like to update a covariance matrix $\mathbf{R}_T$ with a new incoming sample at time $T+1$, i.e. I would like a rank-1 update of the form $\frac{1}{T+1} [T \mathbf{R}_T + \mathbf{x}_{T+1}\mathbf{x}_{T+1}^{\top}]$. However I want a weighted average by forgetting past observations.
That is, I would like somet... |
After finishing my PhD I came to work at one of the top market-maker in options world wide. Reason is: my master program was a lot of options pricing, but zero info on options trading, and I wondered how this theory is applied in practice. Those days are long gone, and I am busy now in another firm trading futures, wit... |
Beginner question. As I understand it (vaguely), the COT report contains information on activities (eg. long/short position held) for specific futures contracts. Take, for instance, COT for [13874A](https://www.quandl.com/data/CFTC/13874A_F_ALL-Commitment-of-Traders-E-MINI-S-P-500-STOCK-INDEX-CME-Futures-Only-13874A), ... |
I'm following the [paper][1] of Pedersen et al. I have a particular question about the section Global Fixed Income Carry.
My main questions are around equation 15. They define Carry as
$$C_t:=\frac{S_t-F_t}{F_t}$$
for a fully funded position. My first question, why is this equivalent to for fixed income securi... |
Hi: Exponential smoothing weights observations by taking a weighted combination of the old estimate and the new. So, if you denote your original matrix ( or current covariance matrix ) as $R_t$ and your new one as $R^{*}_t$, then exponential smoothing does
$R_{t+1} = \lambda R_{t} + (1- \lambda) R^{*}_t $.
But t... |
While theoretical options prices are derived from models, such as Black-Scholes, IV and IV skew reminds us that options prices are ultimately based on supply and demand. My question is the following: how can we claim that implied volatility measures the expected volatility of the underlying during the life of the optio... |
I'm following the famous paper [Carry][1] of Pedersen et al. I have a particular question about the section Global Fixed Income Carry.
My main questions are around equation 15. They define Carry as
$$C_t:=\frac{S_t-F_t}{F_t}$$
for a fully funded position. My first question, why is this equivalent to for fixed ... |
I am somewhat stuck and not sure how to proceed, so any help would be appreciated.
I got the Nelson Siegel model with all parameters for the real data. The curve that is produced is yield vs maturity. The maturities from the given data only provide the yield for 0.25 years, 1 year, 3 years, 5 years. The question is to... |
`reqHistoricalTicks` returns data with 1 second precision, so only looking at timestamp is not enough to merge them. But it seems that the Time&Sales window in TWS is able to consistently present historical tick data in exactly the merged format I want (except it also only has 1 second precision), including rows where ... |
How to merge Trade ticks with Bid_Ask ticks from IB API reqHistoricalTicks, like the Time&Sales window? |
After reading [this][1] and [this][2], I still don't understand the reason for why options are quoted in terms of implied volatilities. My question is: **can somebody give an example that shows the value/usefulness of using IV instead of option's price as a quote?** In my understanding there is one-to-one correspondenc... |
I've been following the development of the D-Limit order at IEX for some time (https://www.google.com/amp/s/mobile.reuters.com/article/amp/idUSKBN1YL1NG). In the last couple.of days I see the SEC has been sued by Citadel Securities for approving this order type (https://www.google.com/amp/s/mobile.reuters.com/article/a... |
I understand for some futures contracts, tick size does change from time to time. Does anyone know where to get historical tick size changes? |
I've been following the development of the [D-Limit order at IEX][1] for some time. In the last couple of days I see the [SEC has been sued by Citadel Securities for approving this order type][2].
Can anyone explain to me how the Crumbling Quote Indicator they use works - particularly the [machine learning/AI][3] co... |
How is Yahoo Finance's continuous futures historical data calculated? Are these front-month numbers? |
The picture below is a P&L chart for a call credit spread that exhibits the pattern I've seen in every single introduction to credit spreads I have looked at. Namely, above the long leg's (green) strike price (in this case $111), the net profit/loss (black) is a negative constant (-$3.50), below the short leg's (red) ... |
What's wrong with this call credit spread? |
The picture below is a P&L chart for a call credit spread that exhibits the pattern I've seen in every single introduction to credit spreads I have looked at. Namely, above the long leg's (green) strike price (in this case \$111), the net profit/loss (black) is a negative constant (-$3.50), below the short leg's (red)... |
The picture below is a P&L chart for a call credit spread that exhibits the pattern I've seen in every single introduction to credit spreads I have looked at. Namely, above the long leg's (green) strike price (in this case \$111), the net profit/loss (black) is a negative constant (-$3.50), below the short leg's (red)... |
The picture below is a P&L chart for a call credit spread that exhibits the pattern I've seen in every single introduction to credit spreads I have looked at. Namely, above the long leg's (green) strike price (in this case \$111), the net profit/loss (black) is a negative constant (-$3.50), below the short leg's (red)... |
https://en.wikipedia.org/wiki/Cross_listing
> Cross-listing (or multi-listing, or interlisting) of shares is when a
> firm lists its equity shares on one or more foreign stock exchange in
> addition to its domestic exchange. To be cross-listed, a company must
> thus comply with the requirements of all the stock exc... |
Cross-listed stocks - how to get capital allocation per country? |
https://en.wikipedia.org/wiki/Cross_listing
> Cross-listing (or multi-listing, or interlisting) of shares is when a
> firm lists its equity shares on one or more foreign stock exchange in
> addition to its domestic exchange. To be cross-listed, a company must
> thus comply with the requirements of all the stock exc... |
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/5lUqM.png
I am slightly confused by this question. My understanding is that the easiest way to determine if there is arbitrage is to compute the state prices and then look at their sign: if one or more of the state prices are nonpositiv... |
[![enter image description here][1]][1]
I am slightly confused by **part (b)** of this question. My understanding is that the easiest way to determine if there is arbitrage is to compute the state prices and then look at their sign: if one or more of the state prices are nonpositive, then we have arbitrage.
... |
please see my answers below.
1)
I would recommend to use one of the following discount rates depending on funding source of the purchase:
- Weighted average cost of capital (WACC)
- Cost of equity
- Cost of debt
- Pre-defined hurdle rate in case of internal corporate project
- Risk-free rate
2)
Value of th... |
I know that the value of a collar option on a stock (buy stock, buy put at $K_1$ and sell call at $K_2$) is given by
$$Collar\ Value = K_1d(t,T)+Put\ Value-Call\ Value$$
My question is, why do we have the $K_1$ term and why do we need to discount it? |
Why and how should we utilize deep learning methods to calculate implied vol of options? I've also heard that finding the fair price of the option is not nearly as important as finding a numerical method to accurately measure IV, is this true? Is this a big point of research in Quant Fin? |
How can deep learning methods measure implied volatility? |
Quadratic programming, a type of convex optimization, is used to solve the minimum variance portfolio weights $$w = \arg \min_w \sigma_P^2 = w^\top \Sigma w$$
because the objective function coincides with quadratic programming, which takes the form: $$x = \arg \min_x x^\top A x$$
The maximum skewness and maximum ... |
Is quadratic programming used to maximize portfolio skewness and kurtosis? |
**Shannon entropy**, $H(X) = -\sum_{i=1}^n p(x) \ln p(x)$ is a probabilistic measure of randomness or disorder within a random variable's probability distribution or histogram.
If we take **rolling window** segments, or snapshots, of a full-sample time series of stock returns $X$, can we expect the Shannon entropy o... |
Does the Shannon entropy of stock returns change over time? |
The quadratic programming approach is can be used to solve problems of the form
$$
\sum_i\sum_j \gamma_{ij}x_ix_j \quad s.t.\quad Ax\leq a\quad \mathrm{and}\quad Bx=b.
$$
A portfolio optimisation that involves decisions over skew and kurtosis introduces terms in $\sum_i\sum_j\sum_k\kappa_{ijk} x_ix_jx_k$ and... |
The quadratic programming approach is used to solve problems of the form
$$
\sum_i\beta_ix_i+\sum_i\sum_j \gamma_{ij}x_ix_j \quad s.t.\quad Ax\leq a\quad \mathrm{and}\quad Bx=b.
$$
A portfolio optimisation that involves decisions over skew and kurtosis introduces terms in $\sum_i\sum_j\sum_k\kappa_{ijk} x_ix... |
The collar strategy combines one unit of stock with a (long) put option with strike $K_1$ and a (short) call option with strike $K_2$. The payoff of this strategy is exactly $K_1$ if $S_T\leq K_1$, $S_T$ if $K_1<S_T\leq K_2$ and $K_2$ if $S_T>K_2$. The easiest way to see that the statement is false is by comparing the ... |
How does a firm calculate whether a project will generate positive NPV? |
What are some of the things that are currently being researched, or what are the big unanswered questions of quantitative finance that researchers are trying to solve? What are some interesting and extremely important topics being researched with direct massive applications to quantitative finance? |
What are the most crucial research areas currently in quantitative finance/interesting subfields? |
The first equation is already a PIT PD if $\displaystyle PD_{i}$
is substituted by TTC PD. The challenges of using this model are:
(1) $\displaystyle \rho _{i}$, the asset correlation, is very difficult to estimate.
(2) A multi-period model is required for *z* so that you can use the PIT PDs in IFRS9.
Us... |
The covariance matrix tabulates *pair-wise* interactions between variables (assets) one-at-a-time into a grid, which can quickly become large as the number of assets included in a portfolio, for example, is increased to the hundreds or thousands, contributing to the curse of dimensionality. Elongating the covariance ma... |
Can the covariance matrix be represented as a scalar or something similarly small, instead of a large pair-wise grid? |
The quadratic programming approach is used to solve problems of the form
$$
\sum_i\beta_ix_i+\sum_i\sum_j \gamma_{ij}x_ix_j \quad s.t.\quad Ax\leq a\quad \mathrm{and}\quad Bx=b.
$$
A portfolio optimisation that involves decisions over skew and kurtosis introduces terms in $\sum_i\sum_j\sum_k\kappa_{ijk} x_ix... |
The Cornish-Fisher expansion is used to approximate the quantile $q_\alpha$ of a return distribution in order to extend the traditional Value-at-Risk (VaR) measure
$$VaR = \mu(X) + \sigma(X) q_\alpha $$
to a higher-moment VaR called **modified VaR**:
$$VaR_{CF} = \mu(X) + \sigma(X) q_{CF} $$
where $$q_{CF} = q_... |
Is there Cornish-Fisher volatility, given that there is Cornish-Fisher Value-at-Risk? |
Given that $dS_t=\mu S_tdt+\sigma S_tdW_t$ ,a risk free rate r and defining Value at Risk and Expected Shortfall as
$VaR_{t,a}=S_0e^{rt}-x$ where $x$ is the amount such that $P(S_t\leq x)=1-a$ ($a:$confidence level)
and $ES_{t,a}=S_0e^{rt}-E(S_t|S_t<x)$ I found
$$VaR_{t,a}=S_0e^{rt} - S_0e^{\sigma\sqrt{t}N^{-1}(... |
In Joshi's *The Concepts and Practice of Mathematical Finance* Page 323--324 I believe that there may be a mismatch of periods with forward rates:
Consider time partition $t_{0} < ... < t_{n}$ where $f_{j}(t)$ is the forward rate for period $[t_{j},t_{j+1}]$ for any $j = 0,..., n-1$ at time $t$. Therefore a ZCB $B_... |
Given that $dS_t=\mu S_tdt+\sigma S_tdW_t$ ,a risk free rate r and defining Value at Risk and Expected Shortfall as
$VaR_{t,a}=S_0e^{rt}-x$ where $x$ is the amount such that $P(S_t\leq x)=1-a$ ($a:$confidence level)
and $ES_{t,a}=S_0e^{rt}-E(S_t|S_t<x)$ I found
$$VaR_{t,a}=S_0e^{rt} - S_0e^{\sigma\sqrt{t}N^{-1}(... |
*Does anyone have a possible explanation or idea why the call/put open interest ratio is so different between the two?*
They have different underlyings. VXX tracks SPVXSTR. VIX options are options on VIX futures. My guess is option volumes on VIX lean toward calls because they're often used as a way to hedge risky a... |
I am trying to come up with a simplistic inflation option model to get a sense of the materiality of some inflation-indexed contracts containing inflation guarantees. I have a stochastic nominal IR model (G2++) and I would like to tie my inflation scenarios to this model. My initial idea: Set up a short rate model to i... |
I'm reading the docs on CME Metal's settlement methodology and looking at the examples section: https://www.cmegroup.com/confluence/display/EPICSANDBOX/Metals+Futures+Settlement+Algorithm+Examples
For the April contract, since no spreads traded during the 13:15-13:30 settlement window, they calculate an implied bi... |
I'm reading the docs on CME Metal's settlement methodology and looking at the examples section: https://www.cmegroup.com/confluence/display/EPICSANDBOX/Metals+Futures+Settlement+Algorithm+Examples
For the April contract, since no spreads traded during the 13:15-13:30 settlement window, they calculate an implied bi... |
I have the risk neutral probability of default extrapolated from the market data of the CDS spreads. How can I empirically estimate the market risk price of the objective probability of default (i.e. PD in the real world) with my dataset?
I know that from Girsanov theorem the price of risk it's $\int_0^t(\Lambda_s)ds$... |
**Shannon entropy**, $H(X) = -\sum_{i=1}^n p(x) \ln p(x)$ is a probabilistic measure of randomness or disorder within a random variable's probability distribution or histogram.
If we take **rolling window** segments, or snapshots, of a full-sample time series of stock returns $X$, can we expect the Shannon entropy o... |
I have a strategy that involves being first in the order queue in a tight market where the tick can change from bid to ask or ask to bid by one tick. I am looking at pegged orders so when the bid changes to ask or the otherway around i want to be first position on that tick change. I was wondering if that is possible w... |
We learn in Finance 101 that the price of a bond is the present value of future cash flows. There is no mention of default risk. Still, bond prices move each day, without a change in the payment schedule. Isn’t there a conflict? Must it not be that any change in the price of a bond is the result of a change in the perc... |
Let's start with the "safest" bonds in the world, and work our way down the credit quality curve. In Europe, the safest and virtually "credit-risk free" bonds are the German Bunds. If you look at the 10y yield of the German bunds, these are **negative** 60 bps as of this morning. The ECB deposit rate is **negative** 50... |
Let's start with the "safest" bonds in the world, and work our way down the credit quality curve. In Europe, the safest and virtually "credit-risk free" bonds are the German Bunds. If you look at the 10y yield of the German bunds, these are **negative** 60 bps as of this morning. The ECB deposit rate is **negative** 50... |
Once reverted the Merton/Vasicek formula I could compute the $PD^{PIT}$ for IFRS9 as
$PD^{PIT}_i(z) = \Phi \left( \phi^{-1}(PD^{TTC}_i) \sqrt{1-\rho_i} + \sqrt{\rho_i}z\right)$
The main issue is to extract a proper set of scenario $z$ as it is not the GDP or any other observable quantity but rather a factor intri... |
How to apply Kalman Filter to GDP data? |
Is there any way to make use of the Beta of an underlying and index, and the implied volatility of options on that underlying and the index?
To specify, if we have available the implied volatility of a closely related index to a single-name option but not the implied volatility of the option itself, can we take the ... |
I have a doubt about the replicating portfolio methodology.
**Example** - Consider an European Call with $K=21$ and an underlying with current price $S_0=20$. We assume that at the maturity the underlying can be $22$ with probability $p$ or $18$ with probability $1-p$. Let $r=0,12$ be the risk-free rate.
The opti... |
I have a doubt about the replicating portfolio methodology.
**Example** - Consider an European Call with $K=21$ and underlying with current price $S_0=20$. We assume that, at the maturity, the underlying can be $22$ with probability $p$ or $18$ with probability $1-p$. Let $r=0,12$ be the risk-free rate.
The optio... |
For a CIR process, which has SDE
$$
dr_t = \alpha (\mu - r_t) dt + \sigma \sqrt{r_t} dW_t
$$
how can I derive the increments over the discrete time-interval from $r_t$ to $r_{t+1}$? |
How can the increments of a CIR process be derived? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.