instruction stringlengths 15 26.1k |
|---|
I came across this passage in a book about PCA and denoising of Markowitz:
> But eigenvalues that are important from risk perspective are least important ones from portfolio optimization perspective.
> Information matrix mixes the returns and has Reciprocal values 1/λ k of the eigenvalues of the covariance matrix λ... |
I am looking for help from other people with experience creating variance covariance matrix that have enough predictive power to actually lower portfolio volatility out of sample.
Using real world data I haven't been able to estimate a variance covariance matrix that has enough stability out of sample to lower portf... |
I'm creating a very simple program that calculates the money generated from SPY dividends in a particular period of time.
I was able to find the historical data in Yahoo Finance (https://finance.yahoo.com/quote/SPY/history?period1=728265600&period2=1697932800&interval=capitalGain%7Cdiv%7Csplit&filter=div&frequency=1... |
If I equalize the discount factor at the same point in time between a fixed-rate payer and a variable-rate payer, I will have the following problem when referencing the data above the swap curve.
Let's say you have a swap rate curve of 3M and 6M, with a fixed rate payout semi-annually and a floating rate payout quarte... |
I know that an up-and-out binary call option of American type will never knock out if barrier is greater than the strike since the option stops immediately if the stock price touches the strike due to unit payoff and thus it will never go up to barrier. But how about finite knock-out observation dates?
I am wonderin... |
The issue is you are working backwards. You're taking data that has been summarized and trying to asses each part. You can't do that. Tick data is the lowest level of knowledge.
For example ... If you know where you at at 9:30 and 9:35 do you know where you are at 9:33?
If you have sufficiently small timest... |
If I equalize the discount factor at the same point in time between a fixed-rate payer and a variable-rate payer, I will have the following problem when referencing the data above the swap curve.
Let's say you have a swap rate curve of 3M and 6M, with a fixed rate payout semi-annually and a floating rate payout quarte... |
I am using signal denoising as explained by [Steve Brunton][1] where He explains that FFT is data driven SVD.
I can select important component by selecting singular values that capture 90% of variance in SVD.
similarly is there any way I dynamically compute threshold (without any PSD visualization) of PSD when... |
Thanks for visting my question:)
I am currently working on Carma(p,q) processes and do not understand how to derive the state equation. So the CARMA(p,q) process is defined by:\
for $p>q$\
the process is def. by:\
\begin{align*}
a(D)C_t=b(D)DB_t
\end{align*}
$D=\frac{d}{dt}$\
$a(z)=z^p+a_1z^{p-1}+...+a_p$\
... |
To start, I'm not an expert in portfolio management. My research involves examining the effects that one financial asset has on another, specifically looking at the connections between cryptocurrency and stock market assets, both of which involve risks. Currently, there's no widely accepted model that explains why thes... |
We're all familiar with the Greeks (Delta, Gamma, Vega, etc.). They provide a quantified exposure to various risk factors. But what about skew and convexity? Is there a similar standardized way to express exposure to smile skew and convexity in terms of specific units or metrics?
For instance, with Delta, we can say... |
The retail crowd often think that it is a good idea to buy long term bonds and hold until maturity to "lock-in" the current higher yields. I think that they are exposing themself to inflation and paying the opportunity cost as well. Unless they have fixed and matching liability, they should stick to shorter term bonds?... |
Does "locking-in" higher yields in long duration bonds make sense for the retail crowd? |
Piterbarg in [Funding beyond discounting: collateral agreements and derivatives pricing](http://www.risk.net/digital_assets/5582/risk_0210_piterbarg_newer.pdf) using Black Scholes derives the value of an option that is not perfectly collateralised as an FVA adjustment to the value of a perfectly collateralised option:
... |
One can risk manage option positions via sabr model (managing risks w.r.t. the sabr params), or just use sabr as an interpolation method to get black vols and risk manage option positions using black greeks. What would be the pros and cons? |
Is SABR model more used as an interpolation method or is used to risk manage option positions in practice? |
as I was trying to teach myself financial mathematics, I came across this topic on transforming black scholes pde to a heat equation. I had the exat same question as this post https://quant.stackexchange.com/questions/43278/black-scholes-to-heat-equation-substitution?newreg=6590e4e31c1f4c13a5ff8f0a999a91c3. The answer ... |
When to use total derivative and when not to? |
People use different parameterization schemes to fit the implied volatilities from the market, e.g., SVI. But often times they cannot always fit well, e.g., the "W"-shape before earnings, the VIX vol skew which is not convex, etc.
I was wondering, what's wrong with calibrating implied volatilities with just polynomi... |
What's wrong with calibrating implied volatilities with polynomials? |
To start, I'm not an expert in portfolio management. My research involves examining the effects that one financial asset has on another, specifically looking at the connections between cryptocurrency and stock market assets, both of which involve risks. Currently, there's no widely accepted model that explains why thes... |
To start, I'm not an expert in portfolio management. My research involves examining the effects that one financial asset has on another, specifically looking at the spillovers between cryptocurrency and stock market assets, both of which involve risks. Currently, there's no widely accepted model that explains why these... |
I have been reading "Advances in Financial Machine Learning" by Marcos Lopez de Prado and "Machine Learning in Asset Pricing," and I noticed that there seems to be little overlap or intersection between the two fields. This has left me confused, and I would like to understand the reasons behind this.
From my underst... |
I have been reading "Advances in Financial Machine Learning" by Marcos Lopez de Prado and "Machine Learning in Asset Pricing" by Stefan Nagel, and I noticed that there seems to be little overlap or intersection between the two fields. This has left me confused, and I would like to understand the reasons behind this.
... |
To start, I'm not an expert in portfolio management. My research involves examining the effects that one financial asset has on another, specifically looking at the spillovers between cryptocurrency and stock market assets, both of which involve risks. Currently, there's no widely accepted model that explains why these... |
I am using signal denoising as explained by [Steve Brunton][1], who explains that FFT is data data-driven SVD.
I can select important components by selecting singular values that capture 90% of the variance in SVD.
Can I dynamically compute the threshold (without any PSD visualization) of PSD when I decompose a... |
I have a very special case, where a client needs a quote on a cross currency basis swap EUR/DEV, DEV is a hypothetical currency where the market for cross currency swaps is inexistant. client wants to give EUR nominal and receive DEV.
the only possible hedge for this swap is daily borrowing/deposits at the 2 Risk fr... |
Could someone intuitively explain why for say a 1y EURUSD option -
If you buy 100 (50/leg of straddle) of 1y at the money EUR vol, that = sq root of 12 x 100 = roughly 350k of EUR vol.
If you buy 100 of 6m EUR vol, that = sq root of 6 x 100 = roughly 245k of EUR vol.
If you buy 100 of 1m EUR vol, that = sq root of ... |
I am trying to forecast Realised volatility using machine learning techniques. Can someone help me with a sample code for the forecasting technique as well as teh code for HAR-RV?
Thank you. |
Please refer to the image.
1. Variance = Vega/(2*Strike) why have they multiplied it with IV to get Variance notional for long 2-year and short 1-year
2. Also the underlined part, is there a typo?
"if the **2-year IV** is above 20.5....."
would be the correct thing, right!?[![enter image description here][1]][1]
... |
Please refer to the image.
The underlined part, is there a typo?
"if the **2-year IV** is above 20.5....."
would be the correct thing, right!?[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/q15hl.jpg |
on BBG and other data providers, it is common that you can find the whole vol surface/cubes. What is the point of the SABR model as an interpolation tool? why cannot people just linear interpolate the vol surface/cubes? instead of backing up the SABR params and interpolate on the param space? |
on BBG and other data providers, it is common that you can find the whole vol surface/cubes. What is the point of the SABR model as an interpolation tool? why cannot people just linear interpolate the vol surface/cubes? instead of backing up the SABR params and interpolate on the param space? is it for the sake of non-... |
what is the IV you're trying to get for? IV is simply a parameter that depends on the model you're fitting. You're not so much trying to fit IV as you are inverting market prices to find this model parameter.
If you are using Black-Scholes and you obtain a 'W' shaped IV skew or any other shape based on market prices... |
Please refer to this image from the famous paper *JUST WHAT YOU NEED TO KNOW ABOUT VARIANCE SWAPS* by Bossu et al. 2005 (page 6).
The underlined part, is there a typo?
"if the **2-year IV** is above 20.5....."
would be the correct thing, right!?[![enter image description here][1]][1]
[1]: https://i.stack.... |
What would be the best way to trade forward volatility or term structure?
One way, I think of is through gamma neutral calendar spreads. The problem with this approach is "change of ATM" and the steep skew which near term maturity(short leg) has is hard to manage.
The other approach is through variance swap, I ... |
How to trade forward volatility? |
When constructing the FedFunds yield curve I want to define the curve based on two separate interpolation schemes. The first on the short end being LogLinear on the discount factors between FOMC meeting dates whilst the second being a smooth Cubic Spline for longer maturities. Assuming we are using a global optimizatio... |
This initiative was sparked by the identification of cointegrated pairs, fitting them to an OU process, and devising an optimal strategy based on the OU process—areas that have already been well researched.
I have developed a model for support and resistance:
$$SUP(X_t,\mu_{sup},\theta_{sup}) = X_te^{(\frac{\mu_... |
I have a 9-element vector I compute at any time T that is derived from the state of the order book. I plot the elements over time and get something like this:
[![enter image description here][1]][1]
I'm interested to see when the nature of the vector changes in relation to major turning points in the price seri... |
How to tell when a vector (9-tuple) changes structure over time? |
I have daily data for a year and I would like to perform exponential smoothing on this data:
[![{s_{t}=\alpha \left\[y_{t}+(1-\alpha )y_{t-1}+(1-\alpha )^{2}y_{t-2}+(1-\alpha )^{3}y_{t-3}+\cdots +(1-\alpha )^{t-1}y_{1}\right\]+(1-\alpha )^{t}y_{0}}][1]][1]
I want a half-life of 3 months out of 12. <br>
What is ... |
Lets say for example my TN for USDHKD point per day spot is -1.9467 and for 1mnth it is -1.4142 and the notional is 100m HKD dollars.
Would you say more or less I would be flat in terms of funding ? do I calcuate the funding for holding the 1 month positon by doing cost = ( ppd x amount $$ x days ) you do that for t... |
Black scholes:The 1-month implied volatility of S& ;P is 16. The slope of the skewness curve is -1 point per 1%; For example, the 99% exercise trades at a premium of 1 vol point. regarding the exercise of 100%.
You sell the ATM to straddle. It has 20 bp of vega
S& ;P rises 1%. The new at-the-money implied volatil... |
Black scholes:The 1-month implied volatility of S& ;P is 16. The slope of the skewness curve is -1 point per 1%; For example, the 99% exercise trades at a premium of 1 vol point. regarding the exercise of 100%.
You sell the ATM to straddle. It has 20 bp of vega
S& ;P rises 1%. The new at-the-money implied volatil... |
Black scholes:The 1-month implied volatility of S& ;P is 16. The slope of the skewness curve is -1 point per 1%; For example, the 99% exercise trades at a premium of 1 vol point. regarding the exercise of 100%.
You sell the ATM to straddle. It has 20 bp of vega
S& ;P rises 1%. The new at-the-money implied volatil... |
I'm working on an automated stock trading program and often consider short selling as part of my strategy. For each potential short sale, there's an associated "locate fee" that I have to pay. My trades are driven by a predictive model that provides an expected return for each trade.
I'm trying to determine a dynami... |
Black scholes:The 1-month implied volatility of S& ;P is 16. The slope of the skewness curve is -1 point per 1%; For example, the 99% exercise trades at a premium of 1 vol point. regarding the exercise of 100%.
You sell the ATM to straddle. It has 20 bp of vega
S& ;P rises 1%. The new at-the-money implied volatil... |
Black scholes:The 1-month implied volatility of S& ;P is 16. The slope of the skewness curve is -1 point per 1%; For example, the 99% exercise trades at a premium of 1 vol point. regarding the exercise of 100%.
You sell the ATM to straddle. It has 20 bp of vega
S& ;P rises 1%. The new at-the-money implied volatil... |
Black scholes:The 1-month implied volatility of S& ;P is 16. The slope of the skewness curve is -1 point per 1%; For example, the 99% exercise trades at a premium of 1 vol point. regarding the exercise of 100%.
You sell the ATM to straddle. It has 20 bp of vega
S& ;P rises 1%. The new at-the-money implied volatil... |
I have plotted the IV of TSLA options using yahoo options data, but the scatter plot doesn't look right, can anyone advise why the plot looks like this? I would expect to see a vol smile plotted.
import pandas_datareader.data as web
import pandas as pd
import matplotlib.pyplot as plt
tesla =... |
Black scholes:The 1-month implied volatility of S& ;P is 16. The slope of the skewness curve is -1 point per 1%; For example, the 99% exercise trades at a premium of 1 vol point. regarding the exercise of 100%.
You sell the ATM to straddle. It has 20 bp of vega
S& ;P rises 1%. The new at-the-money implied volatil... |
I haven't extracted the data using your code, but I suppose there should be nothing wrong with your code, this is a sufficiently simple exercise. Why don't you convert the dataset to Excel and look at the implied volatility values to see if they match? If they do, then it is a data issue.
Usually it is common to no... |
I have plotted the IV of TSLA options using yahoo options data, but the scatter plot doesn't look right, can anyone advise why the plot looks like this? I would expect to see a vol smile plotted.
EDIT additional question, is the same risk-free rate used to get those options data? and what is the rf used in practice,... |
I'm in the process of developing an automated stock trading algorithm, with short selling being a significant part of the strategy. A key factor in deciding whether to short a stock is the associated "locate fee". This fee can vary significantly across stocks and over time.
While I understand that the most accurate ... |
I am reading this article from Marcos Lopez de Prado: [A closed-form solution for optimal mean-reverting trading strategies][1] which talks about finding optimal profit taking and stop loss limits when trading a mean reverting spread. He does so by modeling the spread as an OU process.
In section 7, he says the fol... |
Usually delta hedging an european call option in the black-scholes model is constructed of three assets; a call option, the underlying stock and the risk-free asset often assumed to have constant interest rate. The algorithm usually runs as follows:
At time $t=0$: \
Sell the european call option that expires at tim... |
Item 22 from [this ISDA document][1] gives the following definition for the PV01 of a instrument $i$ with respect to the tenor $t$:
$s(i, r_t) = V_i(r_t+1bp, cs_t) - V_i(r_t, cs_t)$
where $r_t$ and $cs_t$ are the interest rate and credit spread for that tenor.
Following this definition I understand that a curv... |
PV01: bumping all tenors along the curve or only a tenor at a time? |
Item 22 from [this ISDA document][1] gives the following definition for the PV01 of an instrument $i$ with respect to the tenor $t$:
$s(i, r_t) = V_i(r_t+1bp, cs_t) - V_i(r_t, cs_t)$
where $r_t$ and $cs_t$ are the interest rate and credit spread for that tenor.
Following this definition, I understand that a cu... |
I'm interested in how stocks with higher dividend yields perform during periods of market P/E contraction. Specifically, I've observed that (so far I am working on the models):
**Market-wide P/E Contraction:** During times when average P/E ratios are decreasing, most stocks in the market tend to decline in value by ... |
Do Dividend Stocks Offer Better Resilience During Market P/E Contraction? |
I am writing a brute force code in python that implements the path integral formalism for the American put option, the goal being to obtain its price at given a price $S_0$ of the underlying asset.
Let $r$, $\sigma$, and $\mu$ are positive constants. To solve it, I numerically evaluate this integral (using numpy.trapz... |
Without paying for a bespoke dataset or tool, how can I go about creating a total return time series for irs eg for 10y sofr swap such that it includes spot price move + carry/roll?
I’m doing this so that I can generate cta trend following signals on the total return time series of IRS across tenors and currencies |
WHAT IS THE FX/OIS SPREAD ? WHAT CAN i USE IT FOR? |
In fixed income markets there seem to be two prevailing term structure modelling approaches:
1) Market Models
2) HJM Framework
In Market Models, such as the LIBOR Market Model (LMM) and SABR it is common to model market observables such as the Simple Forward Rates (LIBOR rates) or swap rates at different maturitie... |
Why are we so focused on Zero Coupon Bonds? |
I have a pricing formula that is 300x the speed of the QuantLib's Heston pricing class. Is it incredibly slow?
For context, on a slow 1.6 GHz Dual-Core Intel Core i5 processor, my method can reliably price 1000 different options in 0.005 seconds whilst it takes the QuantLib's 1.5 seconds. |
Wrt speed, how optimised is QuantLib's Heston pricing class? |
I have a pricing formula that is 300x the speed of the QuantLib's Heston pricing class. Is it incredibly slow?
For context, on a slow 1.6 GHz Dual-Core Intel Core i5 processor, my method can reliably price 1000 different options in 0.005 seconds whilst it takes the QuantLib's 1.5 seconds.
And what method/integra... |
I'm using quantlib via the quantlib-python or open-source-risk-engine both on pypi. The question relates whether it's possible to extend QuantLib term structure base classes in python rather than C++. My guess is you can't, but wanted to double check.
Background:
I've hit a limitation whereby the available Blac... |
Extending/Subclassing QuantLib Classes in Python? |
So I am writing my bachelor thesis about the naive portfolio vs mean-variance portfolio and I am currently a bit stuck at the part about describing the mean-variance portfolio. I know that if there are only constraints in the form of equalities, you can use the Lagrangian method in order to find a closed form solution ... |
There is a closed-form solution for this in DeMiguel, Plyakha, Uppal, Vilkov (2013) in equation (8). You can take a look at it yourself in the paper as well. However, this is only for the minimum-variance portfolio, I am not sure if there is one for the mean-variance. For this minimum-variance case,
\begin{equation}... |
There is a closed-form solution for this in DeMiguel, Plyakha, Uppal, Vilkov (2013) in equation (8). You can take a look at it yourself in the paper as well. However, this is only for the minimum-variance portfolio, I am not sure if there is one for the mean-variance. For this minimum-variance case,
\begin{equation}... |
In models where the underlying is not modeled directly - such as in the HJM framework or short rate models - how does one then compute the Greeks, i.e. sensitivites wrt. market variables.
As an example, let's say that I've used a calibrated short rate model and Monte Carlo simulation to find the value of an Europea... |
Why is such a proof for futures not suitable for a forward?
For futures we have:
$V_{t}$ is self-financing portfolio: $V_t = \frac{V_t}{B_t}B_t$, where $B_t$ is a riskless asset
Suppose $H_t$ - number of futures in portfolio, then
$dV_t = H_t df_t + \frac{V_t}{B_t} dB_t = H_t df_t + V_t r dt$, where $f_t$ ... |
When Forward is a martingale under risk-neutral measure? |
I am using QuantLib OIS Rate Helpers, and traced schedule creation back to the following function, and noticed that the business convention is hard coded as MF. Is the biz day convention hard coded because OIS is always MF. Or anyway I can create schedule by argument?
MakeOIS::operator ext::shared_ptr<Overn... |
Why the biz day convention of OIS Rate helper is hard coded as Modified Following in QL? |
Do you have access to BBG? Search for U.S. Bellwether Swaps Index. Total return indices are available from 3m to 30 years. These are legacy Lehman/Barclays indices and they continue to be calculated. An old reference paper is available at https://www.pm-research.com/content/iijfixinc/12/2/28.
If you want to calculat... |
I have a pricing formula that is 300x the speed of the QuantLib's Heston pricing class. Is it incredibly slow?
For context, on a slow 1.6 GHz Dual-Core Intel Core i5 processor, my method can reliably price 1000 different options in 0.005 seconds whilst it takes the QuantLib's 1.5 seconds.
And what method/integra... |
I have a Neural Network model that provides predictions for the future returns of a portfolio comprising stocks and cryptocurrencies. The original model operates on standard time bars and generates daily predictions at a specific time, utilising processed OHLC (Open, High, Low, Close) candlestick data as input.
My ... |
Consider a Black Scholes model with $r \geq 0$. Show that the price of an American Put Option with maturity $T > 0$ is bounded by $\frac{K}{1 + \alpha} {(\frac{\alpha K}{1 + \alpha})}^{\alpha}{S_{0}^{-\alpha}}$.
Hint: find $\alpha > 0$ such that $e^{-rt}S_{t}^{-\alpha}$ is a martingale.
I am trying to work through ... |
I am looking into pricing FX options using the Vanna Volga method. I am aware of the commonly referenced shortcomings of this approach and the superiority of SLV, still it is something I want to do.
All of the sources I have come across on the Vanna-Volga indicate that the VV adjustment is based on three strikes: 25... |
I am reading this article from Alex Lipton and Marcos Lopez de Prado: [A closed-form solution for optimal mean-reverting trading strategies (2020)][1] which talks about finding optimal profit taking and stop loss limits when trading a mean reverting spread. He does so by modeling the spread as an OU process.
In sec... |
I am trying to refresh my knowledge of portfolio risk calculation but would like to get a second opinion on the best approach.
I have a set of 10 assets that together make up the benchmark and I have the benchmark weights available.
I also have a lot of historical data so I would be able to estimate a predicted cov... |
I am trying to compute optimized weights (minimum-variance portfolio) for a cumulative return over a period (weekly or fortnightly). In a daily return setting, it is quite simple, I just compute a daily covariance matrix over the past 21 days (yes I used a monthly historical rolling window for the calibration in this c... |
I am trying to compute optimized weights (minimum-variance portfolio) for a cumulative return over a period (weekly or fortnightly). In a daily return setting, it is quite simple, I just compute a daily covariance matrix over the past 21 days (yes I used a monthly historical rolling window for the calibration in this c... |
Should I use common equity or total equity for book value? (when replicating Lewellen's 2015 paper on a cross section of expected stock returns) |
Can you provide the original article that you mention ? They may have explained their methodology. You can easily add external regressors in a GARCH model in R. However, you want to add a dummy variable for the VIX. How would you do it ?
Regarding the implementation, the function ugarchspec() in rugarch package all... |
If one imposes a form $r(t) = \text{...}$ on the cc. short rate, and aims to fit the short end of a SOFR (or another modern RFR) using futures, how would one best go about this within a "curve-fitting" paradigm e.g. least-squares on fitting error a la fitting a bond curve by minimizing error of $\sum_b (\sum_i c_{i,b} ... |
If one imposes a form $r(t) = \text{...}$ on the cc. short rate, and aims to fit the short end of a SOFR (or another modern RFR) using futures, how would one best go about this within a "curve-fitting" paradigm e.g. least-squares on fitting error a la fitting a bond curve by minimizing error of $\sum_b (\sum_i c_{i,b} ... |
The idea is to choose a strike base on the premium and historical data to have maximum Pay off.
For example a selling a (European) call.
$$Payoff = Premium_K - (S(t) -K)^+$$
Replacing $(S(t) -K)^+$ for the pdf
$$Payoff = Premium_K - (1- \Phi(K)) K$$
I know that it is a naive approach, but is there any ... |
Consider a Black Scholes model with $r \geq 0$. Show that the price of an American Put Option with maturity $T > 0$ is bounded by $\frac{K}{1 + \alpha} {(\frac{\alpha K}{1 + \alpha})}^{\alpha}{S_{0}^{-\alpha}}$.
Hint: find $\alpha > 0$ such that $e^{-rt}S_{t}^{-\alpha}$ is a martingale.
I am trying to work through ... |
The idea is to choose a strike base on the premium and historical data to have maximum profit.
For example a selling a (European) call.
$$Profit = Premium_K - (S(t) -K)^+$$
Replacing $(S(t) -K)^+$ for the Cdf
$$Profit = Premium_K - (1- \Phi(K)) K$$
I know that it is a naive approach, but is there any m... |
I am trying to price European call and put options on a stock using the Monte Carlo method, given some dynamics for the underlying that may or may not have a closed-form solution (e.g. Black-Scholes, local volatility, Heston). Interest rates, dividends, etc. can be assumed to be zero at present.
The standard approac... |
is implied standard deviation an estimator of risk neutral measure of volatility? |
Im working on the implementation of the Queue Reactive Model by Lehalle (https://arxiv.org/pdf/1312.0563.pdf), but I have encountered some implementation problems for my specific assets.
1. First, the average spread in them is between 15 up to 70 bps, a lot larger than tick size.
In the paper, the reference price... |
I am dealing with financial data which is available on a Monthly basis. I am planning to apply machine learning techniques like LSTM but issue here is that overall I have very limited training dataset as even if I take 10 years of data, I have only 120 data points. It may lead to overfitting, could you please suggest a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.