instruction
stringlengths
15
26.1k
How to adjust a portfolio's rate of return for contributions and withdrawals?
When I regress the excess performance of a portfolio on the MKT Factor using daily data. I get a Beta of 0.95 and an alpha of 0.00011 that I annualize *252 = 2.77% I know that the annualized return of the MKT Factor is 8.5% for the period and the annualized performance of the excess return of the portfolio is 11%. W...
When I regress the excess performance of a portfolio on the MKT Factor using daily data. I get a Beta of 0.95 and an alpha of 0.00011 that I annualize *252 = 2.77% I know that the annualized return of the MKT Factor is 8.5% for the period and the annualized performance of the excess return of the portfolio is 11%. W...
I'm going to assume that by analyzing "slippage" you mean transactions costs. # Analyzing Latency # First, I will say that analyzing latency issues is *incredibly* hard. You probably do not even know where your strategy will be located: colocated? not colo but close by? You also do not know how fast your algorith...
I am a first year university student. I am trying to replicate an Index, for instance SP500. But instead of doing a full replication (by buying all the stocks), I would rather replicate the index with the stocks that minimize the volatility of the index returns. I was thining I could do this by using covariance m...
Why does the portfolio optimization mean-variance model require the covariance matrix to be positive-definite? Does this requirement have to do with the need to be able to invert the matrix during optimization? How is positive-definiteness achieved? Does it happen because all matrix elements (variance and covariance...
Why does portfolio optimization require a positive-definite covariance matrix?
Firstly, in FX, it all depends on the currencies. As an example, CAD is generally traded t+1 against USD, but is also frequently traded t+2. A EUR/CHF forward can take into account USD holidays (to permit arbitrage or take into account a position via USD), or ignore them. Basically it's an OTC market and the less c...
I am a first year university student. I am trying to replicate an Index, for instance SP500. But instead of doing a full replication (by buying all the stocks), I wonder : **How can I choose a portfolio of N% of index stocks to minimize the portfolio volatility** I was thining I could do this by using covariance ...
When we price a fixed rate bond using `Quantlib`, we generally take below approach - import QuantLib as ql import pandas as pd todaysDate = ql.Date(31, 8, 2019) ql.Settings.instance().evaluationDate = todaysDate spotDates = [ql.Date(1,9,2019), ql.Date(5,9,2019), ql.Date(7,9,2019)]...
I want to simulate a random walk in Matlab: I've found this code but it doesn't work. I have an error with the function S.simByEuler. Someone can explain me how to solve the error? N = 60 F = @(t,X) zeros(N,1); %drift G = @(t,X) eye(N); %diffusion S = sde(F,G,'startState', discount_asset_price(1:60)'); M = 10 simul...
I want to simulate a random walk in Matlab: I've found this code but it doesn't work. I have an error with the function S.simByEuler. Someone can explain me how to solve the error? N = 60 F = @(t,X) zeros(N,1); %drift G = @(t,X) eye(N); %diffusion S = sde(F,G,'startState', discount_asset_price(1...
I want to simulate a random walk in Matlab: I've found this code but it doesn't work. I have an error with the function S.simByEuler. Someone can explain me how to solve the error? N = 60 F = @(t,X) zeros(N,1); %drift G = @(t,X) eye(N); %diffusion S = sde(F,G,'startState', discount_asset_price(1...
I failed to understand how does `QuantLib` manage the day-count issue when determining the actual Coupon payment. Below is my Fixed Rate Bond - import QuantLib as ql import pandas as pd todaysDate = ql.Date(1, 9, 2019) ql.Settings.instance().evaluationDate = todaysDate spotDates ...
I'm reading about the Hull-White model, I understand the math behind it and logic but what I am struggling to understand is how it's actually used in practice ? How can we combine it with technics like Monte-Carlo for IRD options pricing ? Can someone simplify this from a practitioner point of view with some example pl...
Statistical learning has a large assortment of tools for conducting feature selection such as PCA analysis, ridge regression, LASSO, SVM and almost every other machine learning algorithm. In portfolio optimization, portfolio weights are optimized based on data consisting only of asset return time series, $x$, which ...
Isn't portfolio optimization basically just feature selection?
I have below Bond - Issue date : 1/1/2020 Principal 1,000 Coupon : 8% pa Frequency : Semi-annual Tenor: 2 years **This Bond has 2 specific characteristics -** 1. At the maturity NO principal will be paid 2. After 1st year, Bond can be exited on 6/1/2020 (i.e. Put option attached) ...
Instead of using a sample covariance matrix for portfolio optimization, Ledoit and Wolf use an estimator that is the weighted average of the sample covariance matrix and the identity matrix, $I$. This approach can be interpreted as a method that shrinks the sample covariance matrix toward the identity matrix, pulling t...
Instead of using a sample covariance matrix for portfolio optimization, Ledoit and Wolf use an estimator that is the weighted average of the sample covariance matrix and the identity matrix, $I$. This approach can be interpreted as a method that shrinks the sample covariance matrix toward the identity matrix, pulling t...
I can suggest a simple way that is not perfect but is reasonable and not too difficult. ### Transaction Costs Will Change the Optimal Portfolio ### What you want to do is account for the transactions costs of trading. Note that [Engle and Ferstenberg (2007)][1] have shown that including transactions costs shifts th...
The lecture notes I am currently reading give the following example of a delta-neutral portfolio: - minus one derivative (whose value at time $t$, when the value of the underlying is $S_t$, is denoted $f(t, S_t)$) - $\Delta := \frac{\partial f}{\partial S_t}$ shares of the asset underlying the derivative Follo...
How can Ito's Lemma be used to show that a delta-neutral portfolio is instantaneously risk-free?
The Hull-White model is an no-arbitrage short rate model. It is used to price interest rate derivatives such as caps and floors. It generalises the seminal equilibrium model from Vasicek (1977). ---------- ## The Model ## The model postulates that $$\mathrm{d}r_t=\kappa_t(\theta_t-r_t)\mathrm{d}t+\sigma_t \mat...
I'm going to assume that by analyzing "slippage" you mean transactions costs. ## Analyzing Latency ## First, I will say that analyzing latency issues is *incredibly* hard. You probably do not even know where your strategy will be located: colocated? not colo but close by? You also do not know how fast your algori...
I have below Bond - Issue date : 1/1/2020 Principal 1,000 Coupon : 8% pa Frequency : Semi-annual Tenor: 2 years **This Bond has 2 specific characteristics -** 1. At the maturity NO principal will be paid 2. After 1st year, Bond can be exited on 6/1/2021 (i.e. Put option attached) ...
I have below Bond - Issue date : 1/1/2020 Principal 1,000 Coupon : 8% pa Frequency : Semi-annual Tenor: 2 years **This Bond has 2 specific characteristics -** 1. At the maturity NO principal will be paid 2. After 1st year, Bond can be exited on 6/1/2021 (i.e. Put option attached) ...
I'm using MSGARCH package in R. By return_data/*Volatility(fit.model)*, I get the residuals. When I calculate the standard deviation of the residuals, it turns out that it's close to 1 for all residuals. However, the standard deviation in each regime differs greatly. It's about 0.7 in one and 1.6 in the other. Is th...
Is variance of residuals of Markov switching GARCH model regime specific?
I hope you can help me with this question that I really struggle with. Is variance a convex risk measure? I guess not, but I find it really hard to find a counter example. Here are my thoughts. I tried to find an example where: $var(\lambda X+(1-\lambda)Y))>\lambda var(X)+(1-\lambda)var(Y)$. I know that $var(\lamb...
Although maybe this could have been posted at cross-validated, I actually have a financial application in mind. **Problem:** There is a very elementary mistake somewhere, but I can't see it: Let $X$ be a random variable with $X > 0$ almost surely. Let $a$ be a non-negative real-number. Denote by $p(x)$ the pro...
I have some 1-minute bar data. The first datapoint has time t0 and the last one t1. 99.5% of the data between the first timestamp and the last timestamp is there and 0.5% is missing (NaN values). I can confirm that there is a data point for every single minute between t0 and t1. As a data pre-processing step, for co...
I am interest in trading by optimally exploiting a **directional forecast given by an oracle**. The oracle predicts directionally the price of an asset (higher or lower than at the moment of forecast delivery) in a **forecast horizon H**, say 180 minutes. The forecast is delivered several times within a single forec...
Happy to help; but there is one simple question... Are you trying to "replicate" the S&P with a single index weight for each stock from which the index cannot deviate? Or are you trying to "replace" the S&P with a set of constituents that have the lowest volatility/variance? Or are you trying to "reproduce" the ...
**TL;DR** I'm trying to fit a vol surface to market FX options quotes in order to build a local vol model to price with. Unlike listed options that typically have a nice rectangular grid of strikes and tenors, FX options tend to trade OTC and the quotes available don't provide a uniform grid. What is a sensible a...
[![from Neil Pearson's Risk Budgeting p.155][1]][1] [1]: https://i.stack.imgur.com/6jnbB.jpg Hi guys, Is it possible to get the covariance between the individual return and portfolio return given the correlation matrix, volatility matrix and individual return matrix? I know how to get the covariance matrix fo...
[![from Neil Pearson's Risk Budgeting p.155][1]][1] [1]: https://i.stack.imgur.com/6jnbB.jpg Hi guys, Is it possible to get the covariance between the individual return and portfolio return given the correlation matrix, volatility matrix, weights matrix and return matrix? I know how to get the covariance matr...
We can see [here][1] that the generator is an operator which can be determined for a stochastic process. But, in the answers and comments [here][2] we can see that the brownian motion on sphere can be constructed by the assumption that the generator is $\frac{1}{2}\Delta$. - Can anybody explain (for a novice in sto...
I'm trying to understand what we mean by linear and non-linear guaranteed liabilities for pension fund ? often those exposures are hedged by Interest rates derivatives swaps and swaptions.
I'm trying to understand what we mean by linear and non-linear guaranteed liabilities for pension fund ? often those exposures are hedged by Interest rates derivatives swaps and swaptions which I can understand just looking from the payoffs of those derivatives but what I can't still understand how liability can be non...
Hey I know that when market is incomplete, then we have to choose an equivalent martingale measure (I heard about Escher Transform martingale measure, Mean correcting martingale measure, minimal entropy martingale measure). But in Bjork "Arbitrage Theory in Continuous Time" is written: > When dealing with derivative...
How can one estimate the performance of a trading strategy on out of sample dataset? Yes, the good old model selection problem. Everyone knows sharpe ratio of your in-sample dataset by itself is a poor metric for the task at hand. Could other share How they solve this? Perhaps a combination metric and process?
[Variance is concave][1], so portfolio risk must be too. The mean-variance model employs quadratic programming to optimize (minimize) portfolio risk. My understanding is that quadratic programming requires a convex objective function. So if the objective function in portfolio optimization is concave, how can it be s...
Why is portfolio optimization a convex problem if variance is concave?
Hey I know that when market is incomplete, then we have to choose an equivalent martingale measure (I heard about Escher Transform martingale measure, Mean correcting martingale measure, minimal entropy martingale measure). But in Bjork "Arbitrage Theory in Continuous Time" is written: > When dealing with derivative...
- Cover's universal portfolio maximizes the wealth growth rate - Markowitz's mean-variance model minimizes portfolio variance Both allocate assets based on historical returns. How do these two models perform against one another (assuming for Markowitz we use the global minimum variance portfolio by default). H...
Further to comments above, wondering if this isn't a problem intuitively solved by LASSO regression? https://www.statisticshowto.com/lassoregression The objective being to minimise the objective function: [![enter image description here][1]][1] Essentially you add in a penalty term (lambda above) for takin...
i find the modification very confusing and so different from the original question. how did the S&P 500 come into this? it's hard to confuse "no principal paid" in BOLD with principal is paid based at least partially on S&P 500.. i think OP needs to rethink the question/idea. one minor question for clarification: is...
I'm trying to understand what we mean by linear and non-linear guaranteed liabilities for pension fund ? Often this exposures are hedged by Interest rates derivatives swaps and swaptions which I can understand just looking from the payoffs of those derivatives but what I can't still understand how liability can be ...
stratified sampling? probably want to avoid all kinds of tiny holdings and unnecessary complexity while maintaining a maximum tracking error constraint. for something like a high yield index, tracking with the exact ultimate underlying assets may be impossible i.e. hundreds of HY issues that trade sporadically and may ...
Consider a very simplistic example. Imagine a fund with liabilities for this year of 1. These grew by say 3% per annum in perpetuity (call this "G"). The same discount rate applies to all liabilities, say 5% (call this "K"). So the Net Present Value of the future liabilities will be (1+K)/(K-G). While the d...
Calculating CVaR needs Gaussian distribution, however, what if the distribution is not Gaussian? Or the distribution is unknown? Can I use many Dirac Delta functions to estimate a distribution and estimate the CVaR?
> Intuitively, if k1 is too low, then the strategy should be a net credit. That is an incorrect conclusion. The lower that k1 is, the larger the credit will be or the lower the debit cost will be. Bear in mind that k3 also affects cost. The deeper ITM it is, the more it costs, and vice versa.. > ... if I ente...
Under the Black-Scholes framework the dynamics of $S$ is a GBM ($dS_t = \alpha S_t dt + \sigma S_t dW_t $). Introduce a new variable $Y_t:= S_t^a$ for $a$ being a real valued constant. Then by Ito the dynamics of $Y$ is given by: $$dY=aS^{a-1}dS+\frac{1}{2}a(a-1)S^{a-2}(dS)^2 \\ = (a\alpha+\frac{1}{2}a(a-1)\sigma...
I have heard that there are ways that one can trade volatility with options. What option strategies can be used to do so? Are the other ways to trade volatility besides with options? If so, what are they?
I am trying to learn more about options trading and option strategies. One thing that I have noticed is that for a lot of large cap stocks such as KO and UPS, very often there is a very low open interest compared to the amount of shares traded in the underlying. [For example, with KO](https://de.finance.yahoo.com/q...
Why is the liquidity of ATM options often relatively low even though the underlying security is being traded in large quantity?
To begin with, pardon my amateurish question. I'm not into trading whatsoever, hence the following text doesn't represent practical expertise, it's based upon a train of thoughts and various sources I've encountered over the last couple of years. **How are technical trading patterns working?** Literally, I'm skep...
What's the explanation behind technical trading?
Suppose I know people in S&P and thus know which stock will be added into the index. Is trading on that classified as insider trading?
First, a correction is in order: the math question you cite is the variance for a Bernoulli random variable as a function of the parameter $p$. That is, indeed, concave in $p$. However, the variance of a portfolio, $w^T\Sigma w$, is *not* concave in $w$. So your initial presumption of concavity is not correct. For a...
Your scepticism is well-placed, even if there might be some information value in technical signals! Believing they represent an El-Dorado in the absence of understanding, let alone hard work and inevitable losses along the way, will always be the greater sin, irrespective of any potential value (or not) in the technica...
I dunno what to say, really. If it sounds too good to be true, it almost certainly is. If it just feels wrong, it almost certainly is. Even in the soundest jurisprudences like the UK and US common law, laws have been post-hoc interpreted to criminalise activities that were not obviously criminal ex-ante. ...
Here is what the [world knows about inclusion in the S&P500][1]: > To be eligible for S&P 500 index inclusion, a company should be a U.S. company, have a market capitalization of at least USD 8.2 billion, be highly liquid, have a public float of at least 50% of its shares outstanding, and its most recent quarte...
If i have a matrix of multivariate asset returns for $N$ stocks, and i compute from it the covariance matrix and then the correlation matrix, can I always know which of the two will have the higher condition number (higher to infinity means more ill-conditioned, as opposed to near 1 for well-conditioned)?
Which is more ill-conditioned, the asset correlation matrix or covariance matrix?
If i have a matrix of multivariate asset returns for $N$ stocks, and i compute from it the covariance matrix and then the correlation matrix, can I always know which of the two will have the higher condition number (higher to infinity means more ill-conditioned, as opposed to near 1 for well-conditioned)? or is the con...
What shall someone do to prepare for a market crash? Either a partial, referring to e.g. a financial crisis like 2007 - 2008 or a full crash, for example after a war or currency reform (being lead by a Hyperinflation)? Is there any way to protect oneself from such scenario? As absurd as it sounds, but I've always...
How to protect oneself from a market crash?
I am currently trying to calculate a volatility by using the EWMA model because it is said to yield better results than just using an equal weighted calculation approach. However I am a bit confused when it comes to using or choosing the lambda term. According to various sources, in finance (especially risk manageme...
I try to be as concise as possible. Basically I'm following the text "Arbitrage Theory in Continuous Time", by Tomas Bjork. I put here the point where I'm stuck: Chapter 6 - Portfolio Dynamics. [![enter image description here][1]][1] [![enter image description here][2]][2] [![enter image description here][3]][...
I have below Bond - Issue date : 1/1/2020 Principal 1,000 Coupon : 8% pa Frequency : Semi-annual Tenor: 2 years **This Bond has 2 specific characteristics -** <s> 1. At the maturity NO principal will be paid 2. After 1st year, Bond can be exited on 6/1/2021 (i.e. Put option attached)...
Given portfolio risk is $\mathbf{w}\boldsymbol{\Sigma}\mathbf{w}$ where $\boldsymbol{\Sigma}$ is the covariance matrix whose diagonal elements $\sigma^2_{n}$ are individual asset return variances and whose off-diagonal elements are pair-wise covariances of assets, $\sigma_{n,\neg n}$ what is the interpretation of e...
This bond pays four coupon cashflows of \$40 each at 6 month intervals. By themselves, that would be very easy to price from a discount curve, if there is no credit risk. The additional complication is the payoff of the principal, which pays the last month average of the SPX index. For simplicity, I'm going to assume t...
I am analysing option-implied RNDs and risk preferences for my masters thesis, so forgive me if I sound like a beginner in derivatives. I use WRDS to download my historic options data. I am looking at SPX European Friday-settlement options with τ = 5 weeks, looking at a month by month nonoverlapping data. I'll give ...
Why are there so many S&P 500 call options selling with strike @1000?
The weights generated by EWMA do not have to sum to 1. Page 81 of the RiskMetrics 1996 document where EWMA was introduced shows an example with 22 observations, similar to yours, that uses the same value for lambda, and their weight series sums to 0.71. Instead of worrying if this could underestimate the resulting ...
Do the weights of the exponentially weighted moving average (EWMA) have to sum to 1?
Is it a call or put? If only put was traded, then maybe just somebody was buying a lottery ticket. If both call and put are traded, then maybe somebody entered a box position to lock in the risk-free rate. If only call was traded, I don't know...
Was the put of that strike also traded? If yes, then maybe somebody entered a box position to lock in the risk-free rate. If no, I don't know...
Let us ignore particular models such as the CAPM and only focus on the properties of those probability interpretations as they impact financial decision making or estimation. All classical models are Frequentist models. They depend strictly on two things being true. First, the parameters are fixed and known to all...
How do I prove the following equation: P(X=100)≤(P(X=110)-P(X=90))/2 I am not sure how to start and whether it involves using the Black-Sholes formula or not (something like this: [https://www.youtube.com/watch?v=LM6iMfHbQDs&t=939s][1]). Also, please note that this is an option price of a put, not a probability. ...
I don't understand what is the mathematical and financial role of risk free rate in the capm formula . Why do we need to add 10 years treasury yield Or bond to the formula ,then substract it again from the market return and multiply it by beta . What's the point of adding a different financial product to the formula t...
Think of the risk-free asset as a benchmark used by the CAPM. Think of the CAPM as a tool for measuring **excess expected returns** (NOT expected returns). What are excess expected returns *in excess of*, according to the CAPM? The risk-free rate. Why care about the risk-free asset? Because it is what we are measuring ...
I know that implied volatility is the value for which the Black Scholes model returns the correct option price. I also know that if we plot the volatility on the strike price chart, we will see "smile". This means that the Black Scholes model is inappropriate for valuation because it assumes constant volatility. But wh...
The CAPM simply states that, in equilibrium, $$\mathbb{E}[R_i]-R_f=\beta_i(\mathbb{E}[R_m]-R_f),$$ that is, expected excess returns of assets are proportional to the expected market excess returns. It's much more convenient to think in terms of excess returns. You can interpret the risk-free rate as **funding cost**...
I don't understand what is the mathematical and financial role of risk free rate in the CAPM formula . Why do we need to add 10 years treasury yield to the formula then substract it again from the market return and multiply it by beta . What's the point of adding a different financial product to the formula to calculat...
In my course on discrete-time finance we derived the following equality for a lower bound for the value of a not necessarily replicable contingent claim $D$. Here we are looking at a single period market with risk-free interest rate $r$ and $E$ is the expectation operator. $$\sup\{E[Y(1)/(1+r)]:Y \text{ replicable, }\...
I need to apply Basel/Vasicek formula to a 20-years horizon. From my understanding there is no issue in it. Am I misunderstand anything? What? Gratefully.
**Q1 How leveraged ETFs achieve their leverage:** Depending on the fund house's strategy, leverage is typically achieved by investing in futures, swaps, by borrowing funds, or a combination of above. You should refer to the prospectus for an ETF's investment strategy. For the example of TQQQ, as Freelunch has answer...
A model that reflects the volatility smile is one with dynamics that approximate pricing that yields an implied volatility smile. However, your question makes me suspect you are fuzzy on some of these pieces, so let's go through this in more detail. **Implied Volatilities $\implies$ Correct Price?** You mention t...
Hey I found following rules for selecting data for calibration (source: "Kou Jump Diffusion Model: An Application to the Standard and Poor 500, Nasdaq 100 and Russell 2000 Index Options" by Wajih Abbasi1 , Petr Hájek , Diana Ismailova , Saira Yessimzhanova , Zouhaier Ben Khelifa , Kholnazar Amonov): > The fin...
A model that reflects the volatility smile is one with dynamics that approximate pricing that yields an implied volatility smile. However, your question makes me suspect you are fuzzy on some of these pieces, so let's go through this in more detail. **Implied Volatilities $\implies$ Correct Price?** You mention t...
In the place I work they are calculating the spread between bonds and Xccy swaps as follow... Bonds vs Xccy spread = (Xccy bid-ask spread) / (Bonds bid-ask spread) Is this the "right" way to calculate spreads between two instruments? Or what would be the proper way? The inputs are basically bid and asks.
If I want to calculate the Covariance between two stocks but there are missing days in both, how can I deal with missing data? I want to use Pairwise deletion and only use the days of which both observations are seen. I have been reading up on pairwise deletion and I have seen that the data must be missing at random. I...
How to deal with missing stock returns?
In the place I work they are calculating the spread between bonds and swaps as follow... Bonds vs Swap spread = (Swap bid-ask spread) / (Bonds bid-ask spread) Is this the "right" way to calculate spreads between two instruments? Or what would be the proper way? The inputs are basically bid and asks.
If $S_t$ is the underlier price at time $t$ and $K$ is the strike price, the percent moneyness is $\frac{S_t-K}{K}$ for a call and $\frac{K-S_t}{K}$ for a put. Otherwise, the percentages for puts and calls would be confusing. A put option on the stock of a bankrupt firm (so $S_t=0$) should be 100% in-the-money. If we d...
In the classic literature, one always assumes that the assets in the market are all available from the very beginning ($t=0$). And under such condition the market is arbitrage free iff there exists an equivalent local martingale measure. But what if there is some asset that is not available for trading until a strict p...
If I wanted to buy LEAP options for a particular NYSE stock, however they only issue contracts that expire a maximum of 2 years in the future, are there are other alternative securities/contracts that would be equivalent to an option but would allow exposure to that particular asset for 3 years or potentially longer?