instruction stringlengths 15 26.1k |
|---|
Log differenced returns, computed from stock prices, are known to be stationary. What about cumulative returns, are they also stationary? if not why not? Are there other properties, like non-i.i.d., that cumulative returns share with regular returns? |
Are cumulative returns stationary? |
**I want to extract the p-value from the below output. How do i get it?**
library(urca)
data(Raotbl3)
attach(Raotbl3)
lc.df <- ur.df(y=lc, lags=3, type='trend')
summary(lc.df)
Output:
---------
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/yRDUw.png |
My question is about how to extract p-value from ur.df package of urca in R? |
**I want to extract the p-value from the below output. How do i get it?**
library(urca)
data(Raotbl3)
attach(Raotbl3)
lc.df <- ur.df(y=lc, lags=3, type='trend')
summary(lc.df)
Output:
---------
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.... |
I need to apply Basel/Vasicek formula to a 20-years horizon.
$$
{\displaystyle K=LGD*\left[N\left({\sqrt {\frac {1}{1-R}}}*G(PD)+{\sqrt {\frac {R}{1-R}}}*G(0.999)\right)-PD\right]}
$$
From my understanding there is no issue in it.
Am I misunderstand anything? What?
Gratefully.
|
I need to apply Basel/Vasicek formula to a 20-years horizon, both from a 20-years cumulative perspective and year-on-year basis.
Please find below the formula of the Basel Capital (ie. unexpected loss):
$$
{\displaystyle K=LGD*\left[N\left({\sqrt {\frac {1}{1-R}}}*G(PD)+{\sqrt {\frac {R}{1-R}}}*G(0.999)\right)-P... |
In portfolio theory in finance, given a set of $n$ assets to choose from, one often selects portfolio weights so as to maximize expected return and minimize some measure of risk, e.g. variance or [expected shortfall][1]*. If we consider asset returns to be random variables, we are looking for a linear combination, with... |
How to extract p-value from ur.df package of urca in R? |
This is indeed one of the most difficult tasks to do (if not next to impossible).
I would say the standard reference is the following:<br>
[Expected Returns: An Investor's Guide to Harvesting Market Rewards by Antti Ilmanen][1]
An abridged (but still about 170 pages long), yet more current - and free (!) version... |
In portfolio theory in finance, given a set of $n$ assets to choose from, one often selects portfolio weights so as to maximize expected return and minimize some measure of risk, e.g. variance or [expected shortfall][1]*. If we consider asset returns to be random variables, we are looking for a linear combination, with... |
Here is a question i had for a long time but i never asked.
Let's take an easy example, AirBnb will likely have an IPO soon, the stock will be quoted on the market.
Let's say i would like to price an option on this stock, how would i proceed ?
For sure i could sell some with a premium equal to the spot, and wai... |
How to price option on a new underlying? |
In portfolio theory in finance, given a set of $n$ assets to choose from, one often selects portfolio weights so as to maximize expected return and minimize some measure of risk, e.g. variance or [expected shortfall][1]*. If we consider asset returns to be random variables, we are looking for a linear combination, with... |
In portfolio theory in finance, given a set of $n$ assets to choose from, one often selects portfolio weights so as to maximize expected return and minimize some measure of risk, e.g. variance or [expected shortfall][1]*. If we consider asset returns to be random variables, we are looking for a linear combination, with... |
I have to calculate **weekly** log excess returns using the 3-month T-bill. However I am not really sure if I am doing this correctly. This is what I did:
- first I calculated the returns with ln(price/price on previous week)
- then I did this with the 3M T-bill rate: ln((rate/100) +1) / 52. I divided the rate by 1... |
I have to calculate **weekly** log excess returns using the 3-month T-bill. However I am not really sure if I am doing this correctly. This is what I did:
- first I calculated the returns with ln(price/price on previous week)
- then I did this with the 3M T-bill rate: ln((rate/100) +1) / 52. I divided the rate by 1... |
I heard that we can use, say, Eurostoxx Futures as a benchmark to compute the beta of the index's components. Is this relevant? If so, how do we deal with the futures' expiry?
Thanks |
Why Index Futures can be used as a Market benchmark? |
**Is log(1+r/100) Reasonable?**
What you have done is reasonable -- with a possible caveat.
For low interest rates, using $\log(1+\frac{\text{quoted rate}}{100})\cdot\frac{7}{360}$ will be almost identical to $\text{quoted rate}\cdot\frac{7}{360}$. However, good on you for doing the correct math.
**Which Tenor... |
I am trying to extract the `risk free rate and volatility` from the traded American options with expiry Nov-2020 from CME. https://www.cmegroup.com/trading/metals/precious/gold_quotes_globex_options.html#optionProductId=192&strikeRange=ATM
I took prior settlement price and date as the calculation date. A snapshot of... |
Dow Jones and UBS publish one of the most popular commodity index families, the Dow Jones-UBS Commodity Index and its subindices. They provide a detailed manual describing the composition of the index and its daily changes, available at https://us.spindices.com/indices/commodities/dow-jones-commodity-index
I have tr... |
Does anyone have any suggestions on using Monte Carlo simulations to calculate Greeks of basket option? |
As it happens, I, in a past life, was part of the team that created the UBS-CMCI commodity indices...
Your problem will (probably) lie in mismatch between the methodology of monthly rolls a la the index's rolling methodology and the rolls on Bloomberg's generic front-vs-second month contracts. Most of the time, the... |
I have created a bull call spread. There was spread of 70 dollars between the option premium of 2 strikes I selected. Now the spread between option premium of 2 strikes is greater than 100 dollars. What can be the reason for this? I have atm short call and otm long call on gold. Now the price has increased. I created t... |
Can the spread between option premium for bull call spread change over time? |
The local volatility graph tomorrow doesn't change, unless the implied volatility surface tomorrow is not the same as today. LV takes the implied vol surf today as input, and outputs a instantaneous volatility function of spot and time, which can price vanilla options today exactly the same as the market prices.
In ... |
I have read that there are 3 types of pricing models: local volatility, stochastic volatility and stochastic-local volatility models (LSV).
I am now looking at interest rates exotics pricing models and I see that LIBOR market model (LMM) is the market standard for simple exotics. But given this model cannot fit the... |
I am facing something weird in a simulation.
I have calculated a portfolio VaR: 100$.
Then I aggregated the VaR for individual position (loans) and obtain: 98$.
I thought it was not possible for the diversification.
Is it because of the loss distribution shape?
Gratefully! |
Cassandra is the obvious choice. With MongoDB or any RDBMS, you will hold all ticks in a table (collection in Mongo-speak) and index by ticker. This means that when you want to retrieve data for a ticker, the data will not be contiguously stored, and you will have a *massive* usage of index and random reads. Even with ... |
I would like to generate 21 day ahead forecast volatility with ugarchroll.
I know it is similar to ugarchforecast with the exception that ugarchroll is a rolling average which considers initially the last n.start points to generate one sample ahead. While ugarchforecast is not rolling. I tried to coded as follows:
``... |
Hey I try to implement Kou model in Python. This is what I do:
def P(n,k):
if n==k:
return p**n
else:
suma=0
i=k
while i<=n-1:
suma=suma+sc.special.binom(n-k-1, i-k)*sc.special.binom(n, i)*(n_1/(n_1+n_2))**(i-k)*(n_2/(n_1+n_2)... |
I understand that the Pearson correlation indicates the strength of linear relationship between two data sets. The applicability of this to hedging strategies is intuitive: If I can establish a linear relationship between two variables, I can determine how many units of X I need to buy / sell to offset my exposure to Y... |
Hedging or Relative Value Strategies with Rho or Tau Correlations? |
I am facing something weird in a simulation.
I have calculated a portfolio VaR: 100\$.
Then I aggregated the VaR for individual position (loans) and obtain: 98\$.
I thought it was not possible for the diversification.
Is it because of the loss distribution shape?
Gratefully! |
Since this question does not seem to be a duplicate, I will make up a simple (but not entirely unrealistic) numeric example.
Suppose some asset is now trading at some observable price, and suppose further that you have written two options: a put and a call that are slightly out of the money, i.e. whose strikes are, ... |
There are different bond spreads. I’ll outline some common ones:
- **I-Spread:** Interpolated (fair market) swap rate minus bond yield, this is also effectively the same as a matched maturity asset swap spread (MMS ASW). This is the most simple kind of swap which requires no additional pricing library like the other ... |
Since this question does not seem to be a duplicate, I will make up a simple (but not entirely unrealistic) numeric example.
Suppose some asset is now trading at some observable price, and suppose further that you have written two options: a put and a call that are slightly out of the money, i.e. whose strikes are, ... |
There are different bond spreads. I’ll outline some common ones:
- **I-Spread:** Interpolated (fair market) swap rate minus bond yield, this is also effectively the same as a matched maturity asset swap spread (MMS ASW). This is the most simple kind of swap which requires no additional pricing library like the other ... |
There are different bond spreads. I’ll outline some common ones:
- **I-Spread:** Interpolated (fair market) swap rate minus bond yield, this is also effectively the same as a matched maturity asset swap spread (MMS ASW). This is the most simple kind of swap which requires no additional pricing library like the other ... |
Hey I try to implement Kou model in Python. This is my code:
def Hh(n,x):
if n<-1: return 0
elif n==-1:
return np.exp(-x**2/2)
elif n==0:
return math.sqrt(2*np.pi)*scs.norm.cdf(-x)
else:
return (Hh(n-2,x)-x*Hh(n-1,x))/n
def P(n,k... |
As someone who has traded options and warrants, I will say that they can be similar... however, there are a number of differences to keep in mind.
**Options**
An *option* on a stock is the "right but not the obligation"$^*$ to buy or sell a number of shares at a *strike price*. You may choose not to *exercise* th... |
As someone who has traded options and warrants, I will say that they can be similar... however, there are a number of differences to keep in mind.
**Options**
An *option* on a stock is the "right but not the obligation"$^*$ to buy or sell a number of shares at a *strike price*. You may choose not to *exercise* th... |
As someone who has traded options and warrants, I will say that they can be similar... however, there are a number of differences to keep in mind.
**Options**
An *option* on a stock is the "right but not the obligation"$^*$ to buy or sell a number of shares at a *strike price*. You may choose not to *exercise* th... |
What would be the difference between:
dS = u*dt + sigma*dz
and
dS=u*S*dt + sigma*S*dzdS
Is that the former is in absolute terms and the latter is in relative terms with the stock price?
Therefore, if I want to derive the lognormal property for ( G=lnS => dG = (u-sigma^2/2)*dt + sigma*dz) pricing an... |
What would be the difference between:
\begin{align}
dS = udt + \sigma dz
\end{align}
and
\begin{align}
dS=u*S*dt + \sigma*S*dzdS
\end{align}
Is that the former is in absolute terms and the latter is in relative terms with the stock price?
Therefore, if I want to derive the lognormal property for ... |
It is well known that the variance of asset returns, $\sigma$ (whose square root is volatility) is easier to estimate than the asset mean $\mu$ (also known as expected return) because the mean of asset returns is very difficult to estimate.
Why is this the case, given that the sample estimator for volatility itself... |
Why is asset volatility easier to estimate than the asset mean if it contains the mean? |
It is well known that the variance of asset returns, $\sigma^2$ (whose square root is volatility), is easier to estimate than the asset mean $\mu$ (also known as expected return) because the mean of asset returns is very difficult to estimate.
Why is this the case, given that the sample estimator for volatility its... |
For what I learned I personally think that the appropriate answer is it depends. Specifically what is "Markowitz's mean-variance model"?
If we consider the more general definition it is an optimization framework and the portfolio is obtained by optimizing according to an objective function and it is expression of ... |
I personally think that the most appropriate answer is: it depends. Specifically what is "Markowitz's mean-variance model"?
If we consider the more general definition it is an optimization framework and the portfolio is obtained by optimizing according to an objective function and it is expression of the estimated... |
It is well known that the variance of asset returns, $\sigma^2$ (whose square root is volatility), is easier to estimate than the asset mean $\mu$ (also known as expected return) because the mean of asset returns is very difficult to estimate.
Why is this the case, given that the sample estimator for volatility its... |
I personally think that the most appropriate answer is: it depends. Specifically what is "Markowitz's mean-variance model"?
If we consider the more general definition it is an optimization framework and the portfolio is obtained by optimizing according to an objective function and it is expression of the estimated... |
Let me add two points to Quantoisseur's answer.
## Standard Errors ##
The difference between estimating variances and means is that the standard error of the variance estimator depends on the _size_ of the sample (number of observations), whereas the standard error of the mean depends on the _length_ of the sampl... |
I'm assuming that ["limit offset"](https://investor.pershing.com/web/ada-investor/disclosures/stop-order-risk) just means ["limit price"](https://old.reddit.com/r/investing/comments/1ezbg5/questrade_trailing_stop_limittrailing_stop/ca5fivq/). [Help & How-to | Questrade](https://questrade-support.secure.force.com/mylear... |
Why does Canada allow merely 9% spread between the trailing stop price and its limit offset? |
I believe that the right-hand side refers to options sold before [CHK split its stock on Apr 15 2020 1 for 200](https://www.stocksplithistory.com/chesapeake-energy/). 1. But why do the IV differ so much, e.g. at the strike price of 3?
2. Why hasn't this difference in IV been arbitraged?
[, so you
1. buy a Sep 16 2022 \$300 put.
2. But you don't think TSLA will crash to \$300 in a week, so you sell a 7DTE (Aug 28 2020) \$300 put.
1. I've just described a Diagonal Spread with Pu... |
In a Diagonal Spread with Puts, aren't you bearish in the back month? |
> Intuitively, if $k_1$ is too low, then the strategy should be a net credit.
That is an incorrect conclusion. The lower that $k_1$ is, the larger the credit will be or the lower the debit cost will be. Bear in mind that $k_3$ also affects cost. The deeper ITM it is, the more it costs, and vice versa..
> ..... |
No, you are describing a long put calendar spread https://www.optionseducation.org/strategies/all-strategies/long-put-calendar-spread-(put-horizontal).
In that diagonal spread example, see that the two strikes (A & B) are different? In your example, the strikes of the two puts would be the same. |
I have a question regarding swap spread trade. Let's assume I would like to bet on a swap spread widening. For this I could put a payer swap and going long the same maturity cash bond $DV01$ matched. Now assume that I would like to express the $DV01$ of the cash bond with Treasury futures. Now assume my target is to ha... |
Why is the economic exposure in a hedge using treasury futures so different between cash and derivative? |
Does this matlab function help?
The expression for $\Upsilon$ (``Y``) is split up in three parts. The infinite sum is truncated after 10 iterations (``bound``). We already compared our results for ``PFunction``, ``QFunction`` and ``IFunction``.
```
function Y = Upsilon(x,T,mu,sigma,lambda,etaplus,etaminus,p,q)
... |
The answer is not statistical. In almost every other area of statistics, estimating the mean *is* easier and estimating higher moments like variance (and thus volatility), skewness, kurtosis, etc. is harder -- sometimes much harder.
The key points that make financial statistics (or financial econometrics, if you pre... |
[![taken from PWIQF Chapter 3.2.1][1]][1]
Hi guys,
I tried to follow the chapter of PWIQF on binomial model and got stuck when it derived the Black-Scholes (please see image). I tried to backtrack the said equations but couldn't trace back the derivation. I tried looking at Hull's derivation and it's totally diff. si... |
Situation: Sold OTM call while long the underlying. Stock did not tank, it went up too much breaching the breakeven point (strike price+premium).
If I sell 1 lot of call options and I am being long the underlying, do I still need to do delta hedging? If the underlying moves too much on the upside, at expiry, I can s... |
Option seller: Why is delta hedging required if I am long/short the underlying with same number of lots as the OTM options I sold? |
As someone who has traded options and warrants, I will say that they can be similar... however, there are a number of differences to keep in mind.
**Options**
An *option* on a stock is the "right but not the obligation"$^*$ to buy or sell a number of shares at a *strike price*. You may choose not to *exercise* th... |
Let me add two points to Quantoisseur's answer.
## Standard Errors ##
The difference between estimating variances and means is that the standard error of the variance estimator depends on the _size_ of the sample (number of observations), whereas the standard error of the mean depends on the _length_ (or _duratio... |
Let me add two points to Quantoisseur's answer.
## Standard Errors ##
The difference between estimating variances and means is that the standard error of the variance estimator depends on the _size_ of the sample (number of observations), whereas the standard error of the mean depends on the _length_ (or _duratio... |
Predicate that you think TSLA is over-priced at [$2045](https://finance.yahoo.com/quote/TSLA?p=TSLA&.tsrc=fin-srch), so you
1. buy a Sep 16 2022 \$500 ($= B$) put.
2. but don't think TSLA will crash to \$400 ( $= A$) in a week, so you sell a 7DTE (Aug 28 2020) \$400 put. (In my original post, I mistyped A and... |
Why are the IV numbers all over the map?
Are the quotes from real time? If delayed, they're useless. Some of them could be stale (last option trade occurred at a much earlier time). If closing quotes, bid/ask spreads widen significantly after the close, distorting price relationships.
The put spreads are reaso... |
Predicate that you think TSLA is over-priced at [$2045](https://finance.yahoo.com/quote/TSLA?p=TSLA&.tsrc=fin-srch), so you
1. buy a Sep 16 2022 \$500 ($= B$) put.
2. but don't think TSLA will crash to \$400 ( $= A$) in a week, so you sell a 7DTE (Aug 28 2020) \$400 put. (In my original post, I mistyped A and... |
Predicate that you think TSLA is over-priced at [$2045](https://finance.yahoo.com/quote/TSLA?p=TSLA&.tsrc=fin-srch), so you
1. buy a Sep 16 2022 \$300 ($= A$) put.
2. but don't think TSLA will crash to \$400 ( $= B$) in a week, so you sell a 7DTE (Aug 28 2020) \$400 put. $A < B$. (In my original post, $A = B$... |
can someone explain to me please how to calculate the rolling volatility from slide 25
https://www.dropbox.com/s/egfx0ktolojfsek/3.PRIIPs%20Workshop%20-%20Risk%20Reward%20Methodology.pdf?dl=0
I am not getting how they get these numbers, what should I insert in the formula and how to get the stressed volatility t... |
The answer is not statistical. In almost every other area of statistics, estimating the mean *is* easier (*i.e.* it can be estimated with higher precision) and estimating higher moments like variance (and thus volatility), skewness, kurtosis, etc. is harder -- sometimes much harder.
The key points that make financia... |
Why is the economic exposure in a hedge using govi futures so different between cash and derivative? |
can someone explain to me please how to calculate the rolling volatility from slide 25
i get the first 21 LN returns like in the example ..but then i dont really know what to insert in the formula , i get very different answers... please for help .. i need it for school
https://www.dropbox.com/s/egfx0ktolojfsek/... |
How's the bolded sentence below correct? I know this is a [Short/Bear Call Spread](https://www.optionsplaybook.com/option-strategies/short-call-spread/).
If MSFT's share price $ < 13 0$, then as $p \to 130^{-}$, the 110 call's price rockets whilst the 130 call stays OTM. So **"the risk is larger"** that your 100 c... |
For Short Call Spreads, if the stock keeps rising, why does a higher Long Call's strike price enlarge the risk? |
I'm not completely certain from your question, but I'm going to assume you have a basket of $n$ stocks with prices $S_0(t)$ to $S_n(t)$, and you want to price an option with payoff at $C(\tau)$ at time $\tau$ equal to
\begin{align}
C(\tau) = \max\Bigl({\frac 1 n}\sum^n_{i=1} S_i - K, 0\Bigr)
\end{align}
where $K$... |
I have some orderbook data, including 5 ask prices, 5 bid prices, amount of asks and bids for every price, and midprice which is equal to (best bid + best ask)/ 2.
[![available data][1]][1]
I would like to predict absolute change of price in a few days.
Let's say my target is:
target[i] = midprice[i+4] - m... |
Which features based on orderbook information could be relevant for price prediction? |
I'm trying to understand how recently created funds work and ultimately derive a sort of a probability distribution for their future returns, by approximating them with indices and then using the historical data of these indices to construct my distribution, instead of working on the limited data I have on these funds,... |
How to measure the sensitivity of a fund to a set of indices? |
Is there any way to get a list of all trades that took place for a stock? |
As someone who has traded options and warrants, I will say that they can be similar... however, there are a number of differences to keep in mind.
**Options**
An *option* on a stock is the "right but not the obligation"$^*$ to buy or sell a number of shares at a *strike price*. You may choose not to *exercise* th... |
Equation (2) was derived by setting r=0 in the Black-Scholes equation for the Bachelier model (1).
[![enter image description here][1]][1]
Can someone please help me understand all the steps for how we get from the heat equation under time reversal (2) to (3) and then show me how to verify that the equation still... |
I have a few options strategies Id like to back test and I am some familiarity with Python. In particular Id like to backtest a dynamic long vol. strategy putting on backspreads in the direction of the market after a say $5 %$ movement within a month.
Any ideas? Packages and so on. |
I have daily price data of hundreds of companies from 2010-01-01 to 2020-08-21, there are many missing values in my data frame. if I use na.omit, it deletes all my data. I try to use ROC(), but it does not work due to NA values.
How can I exclude N/A and calculate daily log returns?
Thank you guy, I know you are... |
So I've been studying the paper ["Learning To Trade via Direct Reinforcement" Moody and Saffell (2001)][1] which describes in detail how to use exponential moving estimates (EMAs) of returns at time t (`r_t`) to approximate both the Sharpe and Sortino ratios for a portfolio or security.
Note: in the paper he refers... |
For an individual security calculating it's Sharpe and Sortino ratios is straightforward.
What I'm curious about is the following:
Let's say I have a portfolio of several securities, which is a distribution of my total capital: for example Asset A has 25%, Asset B has 50%, and Asset C has 25%. At every timestep ... |
So I've been studying the paper ["Learning To Trade via Direct Reinforcement" Moody and Saffell (2001)][1] which describes in detail how to use exponential moving estimates (EMAs) of returns at time t (`r_t`) to approximate both the Sharpe and Sortino ratios for a portfolio or security.
Note: in the paper he refers... |
So I've been studying the paper ["Learning To Trade via Direct Reinforcement" Moody and Saffell (2001)][1] which describes in detail how to use exponential moving estimates (EMAs) of returns at time t (`r_t`) to approximate both the Sharpe and Sortino ratios for a portfolio or security.
Note: in the paper he refers... |
Since I am very new to options, I thought would be great to ask the opinions of the experts in this group. Please note that I will hold strangles till expiration.
The goal is to sell strangles (OTM calls and OTM puts) and consequently set a STOP-Market order for Long/Short futures if the current stock price touches ... |
So I've been studying the paper ["Learning To Trade via Direct Reinforcement" Moody and Saffell (2001)][1] which describes in detail how to use exponential moving estimates (EMAs) of returns at time t (`r_t`) to approximate both the Sharpe and Sortino ratios for a portfolio or security.
Note: in the paper he refers... |
So I've been studying the paper ["Learning To Trade via Direct Reinforcement" Moody and Saffell (2001)][1] which describes in detail how to use exponential moving estimates (EMAs) of returns at time t (`r_t`) to approximate both the Sharpe and Sortino ratios for a portfolio or security.
Note: in the paper he refers... |
So I've been studying the paper ["Learning To Trade via Direct Reinforcement" Moody and Saffell (2001)][1] which describes in detail how to use exponential moving estimates (EMAs) of returns at time t (`r_t`) to approximate both the Sharpe and Sortino ratios for a portfolio or security.
Note: in the paper he refers... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.