instruction
stringlengths
15
26.1k
So say I wanted to make money off of a simple RSI-MACD algorithm (ofc this may not necessarily make money, but let's say it does). I'd like to leverage my returns using call and put options, but I'm not sure what kind of option would be best. First I'd imagine I'd want to use weekly options that expire very soon sin...
What kind of option would best be suited for a price based algorithm?
I am doing some academic work and using 1 minute bar data. I am wondering if when calculating the return time series, do I need to throw out the first return of the day because it is the return calculated from first bar today and last bar yesterday? My reasoning is that this return is not calculated over 1 minute time ...
Working with 1 minute bar returns - do I throw out the first return of the day?
I am doing some academic work and using 1 minute bar data. I am wondering if when calculating the return time series, do I need to throw out the first return of the day because it is the return calculated from first bar today and last bar yesterday? My reasoning is that this return is not calculated over 1 minute time ...
So say I wanted to make money off of a simple RSI-MACD algorithm (ofc this may not necessarily make money, but let's say it does). I'd like to leverage my returns using call and put options, but I'm not sure what kind of option would be best. First I'd imagine I'd want to use weekly options that expire very soon sin...
I am trying to price a down-and-out, leveraged Barrier option using the closed form formula of Hull (2015). When the price of the underlying asset falls and hits a certain barrier (H), the contract becomes worthless. The issuer of these "Turbo warrants" indicates that the option spot price is calculated as follows: $$...
Why does the closed formula result for a Barrier option price deviate so strongly from the Monte Carlo approximation?
How can I show that below equation holds ? $\int\limits_{0}^{t} f \left( s \right)W_s ds = W_t \int\limits_{0}^{t}f \left( s \right)ds - \int\limits_{0}^{t}\int\limits_{0}^{s} f\left( u \right)dudW_s $ $W_t$ is regular Wiener process.
I am trying to price a down-and-out, leveraged Barrier option using the closed form formula of Hull (2015). When the price of the underlying asset falls and hits a certain barrier (H), the contract becomes worthless. The issuer of these "Turbo warrants" indicates that the option spot price is calculated as follows: $$...
I am trying to price a down-and-out, leveraged Barrier option using the closed form formula of Hull (2015). When the price of the underlying asset falls and hits a certain barrier (H), the contract becomes worthless. The issuer of these "Turbo warrants" indicates that the option spot price is calculated as follows: $$...
I am trying to price a down-and-out, leveraged Barrier option using the closed form formula of Hull (2015). When the price of the underlying asset falls and hits a certain barrier (H), the contract becomes worthless. The issuer of these "Turbo warrants" indicates that the option spot price is calculated as follows: $$...
I am trying to price a down-and-out, leveraged Barrier option using the closed form formula of Hull (2015). When the price of the underlying asset falls and hits a certain barrier (H), the contract becomes worthless. The issuer of these "Turbo warrants" indicates that the option spot price is calculated as follows: $$...
For mean-variance portfolio optimization with short-selling allowed I have seen 2 ways to specify the portfolio constraint. In most resources I've seen, such as https://www.coursera.org/learn/financial-engineering-2/lecture/qwIYs/overview-of-mean-variance (week 1 first video), it is stated as: $$ \sum_{i=1}^N x_i...
If $W_t$ is a standard Wiener Process, then how should I prove that $E \left[ \int\limits_{0}^{t} \frac{1}{1+W_s^2} dW_s \right] = 0$?
I am trying to understand the basics of financial models. Random Walk as a model for asset prices. We use gaussian random numbers to generate a Gaussian Random walk. The variance of the terminal value (cumulative sum of random steps) divided by the square root of the number of steps is $1$ due to central limit t...
I have to estimate CVA for an exotic option. I used Monte Carlo method to price the option with 1000 number of simulation, maturity = 1 year, and 360 time steps. So I have two questions: 1) I've read in many papers that counterparty's probability of default can be estimated by CDS. How can I do it? I'm working in Matla...
I have a time series of electricity futures prices that I have shown to be stationary via the Augmented Dickey Fuller test (alpha = 0.05). Does that mean that, in calculating their individual values-at-risk, I can just simulate a set of prices based on the distribution that best fits them -- and then report the nth per...
Do stationary prices need to be differenced for VaR?
So say I wanted to make money off of a simple RSI-MACD algorithm on SPY (ofc this may not necessarily make money, but let's say it does). I'd like to leverage my returns using call and put options, but I'm not sure what kind of option would be best. First I'd imagine I'd want to use weekly options that expire very s...
If the amount of capital that has to be allocated for each asset given the "long only" optimized portfolio weights is: <a href="https://www.codecogs.com/eqnedit.php?latex=allocation_i&space;=captial&space;\cdot&space;weight_i" target="_blank"><img src="https://latex.codecogs.com/gif.latex?allocation_i&space;=captial...
The amount of capital allocated in each asset given long only weights is calculated as $allocation_i \ = K\cdot w_i$. weights = [ 0., 0., 0., 0., 0., 0., 0., 0., 0., 3.205 0., 0., 0., 0., 1.84, 11.168, 0., 0., 0., 0. 0., 12.297, 11.339, 0., 0., 0., 0., 0., 0., 0. 0., 0., 11.489, 0., 6....
$R_{it}=\alpha_i+\beta_i\cdot R_{mkt}+\epsilon_{it}$ - $R_{it}$ is the return of the stock of observation - $R_{mkt}$ is the return of the reference market - $\beta_i$ is the regression coefficient between the observed stock and the reference market - $\alpha_i$ is the regression intercept between the obser...
I recently came across a quote in a book: "All single factor models share the limitation that shifts in curve levels cause shifts in the package of vanilla options that are a good hedge for the Bermudan option". As far as I can see, all models would require hedge rebalancing for the Bermudan when rates change. ...
It is stated in the LLOB model (i.e. this paper, https://arxiv.org/pdf/1105.1694.pdf ) : Our basic idea is that of a “latent order book” that at any instant of time t aggregates the total intended volume for sells at price p or above, $V+(p, t)$, and the total intended volume for buys at price $p$ or below, $V−(p,...
> An alternative measure of losses to Var, with more attractive properties, is Conditional Value-at-risk or CVar which is also called Mean Excess Loss, Mean Shortfall, or Tail Var. CVar is a more consistent measure of risk since it is sub-additive and convex. Moreover, it can be optimized using linear programming and ...
> An alternative measure of losses to Var, with more attractive properties, is Conditional Value-at-risk or CVar which is also called Mean Excess Loss, Mean Shortfall, or Tail Var. CVar is a more consistent measure of risk since it is sub-additive and convex. Moreover, it can be optimized using linear programming and ...
> An alternative measure of losses to Var, with more attractive properties, is Conditional Value-at-risk or CVar which is also called Mean Excess Loss, Mean Shortfall, or Tail Var. CVar is a more consistent measure of risk since it is sub-additive and convex. Moreover, it can be optimized using linear programming and ...
I am building a model which predicts the Excess Daily Returns over a time period. How do I convert these excess daily returns to excess quarterly returns? Should I just do an average of all the daily returns in that quarter, or is there another method to do this? Thanks!
That is really extensive question. I am no longer part of CVA desk, but I'll answer on this question, based on my experience. So, let's take a look at your first question. The CDS is a credit derivative, which price demonstrates a spread (sometimes with a multiplier) between bond/debt/protected asset buyer and selle...
I have learned some attribution models such as Campisi. It decomposes the return of bond into treasury return, spread return, and coupon return. It works like: r = y*dt - D*dy_treasury - D*dy_credit Can an interest rate swap be decomposed in a similar way?
I am working on a supervised learning approach to Time Series Regression, and am currently investigating fractionally differentiation (optimizing the stationarity/information tradeoff) discussed chapter 5 in Dr. Lopez de Parado's Advances in Financial Machine learning. When I previously worked with differentiated ti...
I have learned some attribution models such as Campisi. It decomposes the return of bond into treasury return, spread return, and coupon return. It works like: $$r = y\times dt - D \times dy_\text{treasury} - D \times dy_\text{credit}$$ Can an interest rate swap be decomposed in a similar way?
I am working on a supervised learning approach to Time Series Regression, and am currently investigating fractionall differentiation (optimizing the stationarity/information tradeoff) discussed chapter 5 in Dr. Lopez de Parado's Advances in Financial Machine learning. When I previously worked with differentiated tim...
Do quants need to know Accounting? In my school's undergrad Quant program, we had Financial Accounting and Managerial Accounting, which were listed as prerequisites for our undergrad Finance subjects. I am taking grad Quant now, and I have not seen Accounting ever turn up again except in Financial Statements. In ...
I was studying an example given in https://quant.stackexchange.com/questions/50457/variance-of-a-time-integral-with-respect-to-a-brownian-motion-function?rq=1 There we need to calculate the Variance of $I_t = \int\limits_{0}^{t} f \left(s \right) W_s ds$. Then, it said that $E \left[ I_t^2 \right] = \int\limits_...
I was studying an example given in https://quant.stackexchange.com/questions/50457/variance-of-a-time-integral-with-respect-to-a-brownian-motion-function?rq=1 There we need to calculate the Variance of $I_t = \int\limits_{0}^{t} f \left(s \right) W_s ds$. Then, it said that $E \left[ I_t^2 \right] = \int\limits_...
I have come across the term "industry fixed effects" in some papers in relation to cross sectional regressions in asset pricing. I know what "fixed" regression models are, but not what is meant by "industry fixed"... Can someone explain to me in a clear way what exactly this is? Thanks for the answers.
What are industry fixed effects?
A FVA (forward volatility agreement) is a forward contract on the ATM implied volatility. So at at maturity date $T$ the payoff of a FVA with unit notional is $$ (I_{ATM}(T,T') - K) $$ where $I_{ATM}(T,T')$ is the ATM (or ATM forward) implied volatility at $T$ of a vanilla option with maturity $T'$. How are thes...
Are there any good academic articles about Feb 2018 correction?
Isn't that exactly how you recover the option price? You paid the option price $C$, conduct delta-hedging continuously with initial capital $-C$ (zero cash to start with). At the end, the option expires and has payoff $X$, your hedging portfolio should then end up with $-X$. The pnl from you hedging portfolio is $-X-(-...
I would like test if there are "crash risk premia" priced into out-of-the-money puts. My initial thought was to create a portfolio with a short positions in (deep) OTM put options and a long position in ATM or less-OTM puts. If this strategy would yield consistent positive returns, would this indicate that (deep) O...
The London Stock Exchange maintains a [public list of current FTSE 100 constituents][1]; however, getting historical components (much less weights) is more difficult. You can look at revisions to the wikipedia page to get some of the changes; however, for good data on historical index composition you will need to pa...
Does shorting DOOM puts yield consistent return? Yes*. (I'll get to that star shortly.) Is there a crash risk premium built into those puts? Yes. Are there papers studying these? Yes; many. [Bondarenko (2014)][1] is by far the go-to paper on this topic. In fact, you will see many citations of the paper throughout th...
Firstly let me apologise if this has been asked on on here before - I went through some of the factor modelling post on here but I've struggled to find the answers. I am new to the quant world and I am fascinated on how I can introduce science to my equity portfolio I want to learn more about factor modelling and ho...
I was lookin at some stocks and find that implied volatility changes without the stock moving too much. What are the causes?
There are multiple ways to model portfolio factor exposure, for instance: 1- Return based approach: regressing returns of a portfolio vs several factors (similar to what your doing). 2- Holdings based approach (more accurate): essentially you would want to get the factor exposure of all individual holdings, then, de...
> An alternative measure of losses to Var, with more attractive properties, is Conditional Value-at-risk or CVar which is also called Mean Excess Loss, Mean Shortfall, or Tail Var. CVar is a more consistent measure of risk since it is sub-additive and convex. Moreover, it can be optimized using linear programming and ...
Congratulations on trying to manage your portfolio better. That is wise. If you lose money, you may at least understand why you lost money. Ideally, you could also protect your portfolio against risk factors you do not want to take. However, this gets a little tricky since some factors are not clearly risk factors. ...
Congratulations on trying to manage your portfolio better. That is wise. If you lose money, you may at least understand why you lost money. Ideally, you could also protect your portfolio against risk factors you do not want to take. However, this gets a little tricky since some factors are not clearly risk factors. ...
Congratulations on trying to manage your portfolio better. That is wise. If you lose money, you may at least understand why you lost money. Ideally, you could also protect your portfolio against risk factors you do not want to take. However, this gets a little tricky since some factors are not clearly risk factors. ...
I was lookin at some stocks and find that implied volatility changes without the stock price moving too much. What are the causes?
Why does implied volatility decrease without a change in stock price?
I'm trading bitcoin option and i'm trying to find arbitrage opportunity with a synthetic short/long and a long/short future position. The options are europeans style and settled in BTC. The contracts are future inverse contracts. My equity and PNL are in bitcoin and I want to be hedge at any time so I am protect to...
Portfolio weights are linear combinations of assets. How can it be true then for there to be, and how can someone prove that there is any, non-linear correlation issues in portfolio optimization? Is the normality assumption of Markowitz all there is to blame for non-linear portfolio correlation/co-dependencies if they ...
Is non-linear correlation an issue in portfolio optimization?
I was reading this paper (https://www.cmegroup.com/education/files/deconstructing-futures-returns-the-role-of-roll-yield.pdf ) about futures rollover, and cannot figure out the meaning of the sentence in bold: On a snowy New Year’s Day in 2012, an individual investor (we’ll call him Spencer) takes a seat by the fire...
I'm a bit confused about the definition of the 'Beta Adjusted Return', say I have benchmark whose return is $r$ and a stock whose return is $R$, the beta adjusted return is defined as $$ \frac{R-\beta r}{\sigma} $$ where $\beta$ i...
Suppose I have an adapted process $X_t$. I have available option prices on $X_t$ for a range of strikes and maturites. In particular, I have $$ C_0(K, T_1) = D(T_1)\mathbb{E}_Q[(X_{T_1} - K)_+], $$ and $$ C_0(K, T_2) = D(T_2)\mathbb{E}_Q[(X_{T_2} - K)_+] $$ where $D(t)$ is the discounting factor (and I am as...
This is a forward starting option. It's price cannot be determined by the vanillas you have because vanillas only determine the marginal distributions of the random variables - whereas to price this one, you need to somehow produce a joint distribution (correlate $X_{T1}$ and $X_{T2}$). An equivalent way of doing th...
What are the theoretical justifications for the operation of trading algorithms based on technical analysis using different indicators such as rsi, stochastic, macd, etc.? or do they really not work?
I would like to assess the resilience of some sectors in Europe but I honestly lack data, and it seemed to me the simplest solution to be able to implement univariate (arima etc) and multivariate (mainly VAR with some variables like inflation) forecasts using Stoxx datas. Is this a terrible idea ? Thanks.
Is it legitimate to assess the resilience of industries and sectors through the stock market?
Great question! To answer this, there are a few things we need to know about futures in general, and VIX in specific. I've skipped some details below to keep the length reasonable, feel free to ping in the comments. 1. Futures are exchange-traded contracts that have a fixed expiry and reference an underlying s...
Stochastic-Local Vol (SLV) is an attempt to mix the strengths and weaknesses of both Stochastic Vol and Local Vol models. Below, I'll quickly summarise each model and their strengths and weaknesses, and then discuss how SLV tries to improve things. Although there are many stochastic vol models, I limit the discussion h...
Stochastic-Local Vol (SLV) is an attempt to mix the strengths and weaknesses of both Stochastic Vol and Local Vol models. Below, I'll quickly summarise each model and their strengths and weaknesses, and then discuss how SLV tries to improve things. Although there are many stochastic vol models, I limit the discussion h...
What is meant by volatility trading? Is it trading 'options'? Aren't options meant to leverage stock prices, and not their volatility?
What is volatility trading?
With a payer swaptions delta and gamma is there a method for approximating pnl for a given move in underlying swap rate? (An equivalent to the Taylor expansion for a vanilla call) Thanks!
I am trying Block Bootstrapping for synthetic data generation. For example in http://www.blackarbs.com/blog/synthetic-data-generation-part-1-block-bootstrapping the author @blackarbsceo use data from the iex trading exchange sampled at a 30 sec resolution and apply Block Bootstrapping mentioned above. The ques...
Say we have assets A (with weight $w_a$) and B (with weight $w_b$) in a portfolio. A and B returns are correlated: $Cov(R_a, R_b)\neq 0$. The portfolio's tracking error is: $std(R_p - R_b) = std((w_a*(R_a-R_p)+w_b*(R_b -R_p))$. How can I calculate, based on the asset's tracking error ($std(R_i-R_p)$) and its norm...
How to calculate a position's contribution to its portfolio's tracking error?
The answer to your question about the theoretical justification for technical analysis depends on the price series being analyzed. There is some evidence for a few technical indicators to have predictive value. In general, though, there is little theory behind technical analysis apart from an appeal to psychology. #...
Say we have assets A (with weight $w_a$) and B (with weight $w_b$) in a portfolio. A and B returns are correlated: $Cov(R_a, R_b)\neq 0$. The portfolio's tracking error is: $std(R_p - R_b) = std((w_a*(R_a-R_p)+w_b*(R_b -R_p))$. How can I calculate, based on the asset's tracking error ($std(R_i-R_p)$) and its norm...
> An alternative measure of losses to Var, with more attractive properties, is Conditional Value-at-risk or CVar which is also called Mean Excess Loss, Mean Shortfall, or Tail Var. CVar is a more consistent measure of risk since it is sub-additive and convex. Moreover, it can be optimized using linear programming and ...
The answer to your question about the theoretical justification for technical analysis depends on the price series being analyzed. There is some evidence for a few technical indicators to have predictive value. In general, though, there is little theory behind technical analysis apart from an appeal to psychology. #...
In the book *Quant Job Interview Questions & Answers*, in section 2, question 2.4 says suppose two assets in a Black-Scholes world have the same volatility but different drifts. How will the price of call options on them compare? In the answer, it's assumed that the two asset prices follow $$dS_t^1=\mu_1S^1_tdt+\sigma...
As time passes P/L line is getting closer and closer to expiration P/L line. Volatility resists P/L line to get closer to expiration P/L line. You can think about Volatility as an elastic element btw P/L line and expiration P/L line. The higher is Volatility the bigger is the gap btw P/L line and the expiration P/L ...
Say we have assets A (with weight $w_a$) and B (with weight $w_b$) in a portfolio. A and B returns are correlated: $Cov(R_a, R_b)\neq 0$. The portfolio's tracking error is: $std(R_p - R_b) = std((w_a*(R_a-R_p)+w_b*(R_b -R_p))$. How can I calculate, based on the asset's tracking error ($std(R_i-R_p)$) and its norm...
Except the recent boom (entirely driven by tech) isnt the stock market just an oscillator around quarterly price to sales? I'm getting like 25% explained variance just from that.
Is it pretty easy to predict the stock market from price/sales?
Except the recent boom (entirely driven by tech) isnt the stock market just an oscillator around quarterly price to sales? I'm getting like 25% explained variance just from that. The returns are close to market but that's just because most quarters have been up.
Is there a closed-form (analytical) solution for the Cox-Ingersoll-Ross SDE \begin{equation} dr_t=k_r(\theta_r-r_t)dt+\sigma_r\sqrt{r_t}dW_t\tag{1} \end{equation} ?<br><br> Notice that $\{r_t\}$ is our process of interest, $k_r$ and $\theta_r$ are constant parameters and $dW_t$ denotes Wiener increment.<br><br> I...
CIR model. Is there a closed-form solution or even a good proxy of analytical solution?
I searched this before but never got further than generic definitions and and websites to look at. What I'm looking for is how to define a stock's shares float quantity. How does Yahoo Finance or Finviz define the amount of shares float? By definition shares float is represented by 'subtracting closely held shares ...
How to quantify shares float on a stock?
In *Hutchinson et al* (1994) paper, to estimate $\sigma$ for the *Black-Scholes* formula, it says : [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/0cEDM.png I'm not sure to understand. If $s$ is the standard deviation of the 60 last daily returns, it's the daily volatility based on ...
In *Hutchinson et al: A Nonparametric Approach to Pricing and Hedging Derivative Securities Via Learning Network* (1994) paper ([link][1]), to estimate $\sigma$ for the *Black-Scholes* formula, it says (p. 881): [![enter image description here][2]][2] I'm not sure to understand. If $s$ is the standard deviation...
This is indeed very strange, and is probably a typo in the paper. It would be correct if $s^2$ is the sum of squares of the last 60 days returns, and $s$ is the square root of that. Then the division by $\sqrt{60}$ would give the daily vol. But if $s$ is the standard deviation, as they claim, then we would be doing ...
The term *float shares* is not well-defined. The idea seems simple: exclude shares which are not likely or able to trade. However, this immediately raises questions of which shares to exclude: - shares which have not traded in a few years? - shares held in a trust prohibiting them from trading over the next 5 years? ...
I am working on understanding the Hurst exponent calculation by Ernest Chan; however, the description of the algorithm does not match the Python implementation. Chan[18] outlines following steps for Hurst Exponent computation using R/S method: ▪ Divides the time series of length into 2 ( = 0,1,2…) adjacent su...
Why does the Hurst exponent pseudo code not match the Python implementation?
I am working on understanding the Hurst exponent calculation by Ernest Chan; however, the description of the algorithm does not match the Python implementation. Chan [*Algorithmic Trading: Winning Strategies and Their Rationale*] outlines following steps for Hurst Exponent computation using R/S method: ▪ Divid...
Suppose $$ dS = \sigma S dW $$ and $$ d\sigma = a(\sigma,t) dt + b (\sigma,t) dZ $$ with $dW dZ = \rho dt$. What are the conditions necessary such that the implied volatility skew of vanilla options attains a (global) minimum or maximum value for each maturity date $T$? In other words that the slope...
From my understanding, we have to integrate N(d1(Sx-D,B,t)) on both asset and time-space to derive the EEP(B,t) on each t before the ex-date to get current early exercise premium EEP(S,0). Where Sx = S * exp((r-s**2/2) * t + x * s * sqrt(t)). Is this correct? Thanks. ----------
I was thinking that since XVA is on uncollaterized exposure, we should be using LIBOR discounting environment. Why don't we do that?
Say we have assets X (with weight $w_a$) and Y (with weight $w_y$) in a portfolio. X and B returns are correlated: $Cov(R_x, R_y)\neq 0$. The portfolio's tracking error is: $std(R_p - R_b) = std((w_x*(R_x-R_b)+w_y*(R_y -R_b))$. How can I calculate, based on the asset's tracking error ($std(R_i-R_p)$) and its norm...
From my understanding, we have to integrate $N(d1(S_x-D,B,t))$ on both asset-price and time-space to derive the Early Exercise Premium $EEP(B,t)$ on each $t$ before the ex-date to get current early exercise premium $EEP(S,0)$. Where $$S_x = S \exp((r-\sigma^2/2) t + x \sigma \sqrt{t})$$ Is this correct? Thanks. ...
I am running a simple 4 factor model which includes the factors: Benchmark (Market - FortyConsumerSixtyHealthcare), SMB, HML and MOM. When I simply apply the regression to the portfolio returns and the benchmark I get a statistically significant result and a fairly strong Beta of 0.4262: ====================...