instruction
stringlengths
15
26.1k
Are there any tools or useful algos for identifying corner portfolios?
Let's say I am performing mean-variance optimization subject to some weight constraints. I'd like to identify the set of corner portfolios so that I can linearly interpolate the entire efficient frontier. A corner portfolio defines a segment on the minimum-variance frontier within which i) portfolios hold identical ...
Currently, I have history data for 10 years. Most of the time, I only interested in getting EMA/ MACD for the last history point (means yesterday point). Instead of using entire 10 years history, I would only like to provide N data points, for fast calculation, yet get a reasonable accurate EMA. Currently, here is ...
*Please note: I posted this in nuclearphynance first, but didn't get any replies.* For desks which sell exotics it is common practice (as far as I know it) to calibrate the model (Stochastic Volatility, etc...) using implied vols of the plain vanillas. This seems totally fine as these are usually the hedging instrum...
Parameter estimation using martingale measures - include real world data?
Let's say I am performing mean-variance optimization subject to some weight constraints. I'd like to identify the set of corner portfolios so that I can linearly interpolate the entire efficient frontier. A corner portfolio defines a segment on the minimum-variance frontier within which i) portfolios hold identical ...
Let's say I am performing mean-variance optimization subject to some weight constraints. I'd like to identify the set of corner portfolios so that I can interpolate the entire efficient frontier. A corner portfolio defines a segment on the minimum-variance frontier within which i) portfolios hold identical assets, a...
I am currently using CQG for spread trading and have a spread trading strategy in CQG chart. I am trying to automate my spread trading strategy in CQG, but CQG told me to look at CQG API sample to build my own system or get a third party software.. Have anyone built an execution system with CQG API ? Thanks. http:...
I'm not very well read in the area of high finance but I'm curious how forex brokerages are able to provide the backing for leverage that they can provide to customers. Is it possible to do this without charging interest, only making the return on the spread against the rates they can get? Are there standard alg...
what is a typical way forex brokerages can provide cheap leverage for their customers?
I implemented these algorithms just a few months ago! I would just double the number of data points that you need. If you need a 10 day EMA, take 20 data points. For the MACD, you need the EMA, so add them together then double it. Here is the algorithm including an Excel spreadsheet you can compare with: http://stoc...
Rating systems, as defined by the Basel II Accord, can be classified into two broad types - through-the-cycle (TTC) or point-in-time (PIT) - and the probability of default predicted by such a system can usually have different interpretations. In practice, no rating system is purely TTC or PIT. One advantage of PIT s...
Are there any well known methods of testing through-the-cycle rating systems?
Rating systems, as defined by the Basel II Accord, can be classified into two broad types - through-the-cycle (TTC) or point-in-time (PIT) - and the probability of default predicted by such a system can usually have different interpretations. In practice, no rating system is purely TTC or PIT. One advantage of PIT s...
GARCH models were developed by Robert Engle precisely to deal with the problem of auto-correlated residuals (which occurs when you have volatility clustering for example) in time-series regression. To ask "Why are GARCH models used to forecast volatility if residuals are often correlated?" misses this point.
Rho is the partial derivative of the value of call option, $C$, w.r.t the riskfree interest rate $r$: $$\rho \equiv \frac{\partial C}{\partial r}$$ In the standard B-S formula this term is positive, but **what's the intuition**? I understand that two forces are at hand: one is that as $r$ increases future exercise ...
Rho is the partial derivative of the value of call option, $C$, w.r.t the riskfree interest rate $r$: $$\rho \equiv \frac{\partial C}{\partial r}$$ In the standard B-S formula this term is positive, but **what's the intuition**? I understand that two forces are at hand: one is that as $r$ increases future exercise ...
Yes, the weights of the first eigenvector of a covariance matrix represent the market factor and also the largest source of systematic risk (variation of returns). Why PCA? Well, PCA simply identifies the eigenvector that maximally explains the variance of the system. It turns out that this is the "market factor" - ...
Yes, the weights of the first eigenvector of a covariance matrix represent the market factor and also the largest source of systematic risk (variation of returns). Why PCA? Well, PCA simply identifies the eigenvector that maximally explains the variance of the system. It turns out that this is the "market factor" - ...
Say there is an American put option which expires in N months from today. Then a call on put (CoP) option provides the owner the right to buy the American put option in exactly M < N months (but no sooner). The corresponding put on put (PoP) option provides the owner the right to sell the American put option in exa...
Does put-call parity hold for a compound option with underlying American option?
Say there is an American put option that expires $N$ months from today. A call-on-put (CoP) option provides the owner the right to buy the American put option in exactly $M < N$ months (but no sooner). A corresponding put-on-put (PoP) option provides the owner the right to sell the American put option in exactly $M...
Rho is the partial derivative of the value of call option, $C$, w.r.t the riskfree interest rate $r$: $$\rho \equiv \frac{\partial C}{\partial r}$$ In the standard B-S formula this term is positive, but **what's the intuition**? I understand that two forces are at hand: one is that as $r$ increases future exercise ...
Yes, the weights of the first eigenvector of a covariance matrix represent the market factor and also the largest source of systematic risk (variation of returns). Why PCA? Well, PCA simply identifies the eigenvector that maximally explains the variance of the system. It turns out that this is the "market factor" - ...
Yes, the weights of the first eigenvector of a covariance matrix represent the market factor and also the largest source of systematic risk (variation of returns). Why PCA? Well, PCA simply identifies the eigenvector that maximally explains the variance of the system. It turns out that this is the "market factor" - ...
Rho is the partial derivative of the value of call option, $C$, w.r.t the riskfree interest rate $r$: $$\rho \equiv \frac{\partial C}{\partial r}$$ In the standard B-S formula this term is positive, but **what's the intuition**? I understand that two forces are at hand: one is that as $r$ increases future exercise ...
The Black-scholes formula typically has time as `sqrt(T-t)` or some such. My questions: * What is the granularity of this? If we treat `t` as the number of days, then logically on the day of expiry, d<sub>1</sub> would involve division by zero. * Given that `t` is the number of days in the year, what value should w...
Rho is the partial derivative of the value of call option, $C$, w.r.t the riskfree interest rate $r$: $$\rho \equiv \frac{\partial C}{\partial r}$$ In the standard B-S formula this term is positive, but **what's the intuition**? I understand that two forces are at hand: one is that as $r$ increases future exercise ...
The Black-scholes formula typically has time as $\sqrt{T-t}$ or some such. My questions: * What is the granularity of this? If we treat $t$ as the number of days, then logically on the day of expiry, d<sub>1</sub> would involve division by zero. * Given that $t$ is the number of days in the year, what value should ...
This is a follow up question of [this one][1]. My aim is to create the most realistic historical option prices possible with publicly available data. I want to do this for backtesting purposes. The following paper gives a good master plan how to backtest option strategies with the standard Black Scholes formula. ...
Besides of the [VIX][1] there is another vol datum publicly available for the S&P 500: the [SKEW][2]. Do you know a procedure with which one can extrapolate other implied vols of the S&P 500 smile with these data (or with other publicly available [vol data][3])? **Addendum:**<br> I created a follow up question [...
This is a follow up question of [this one][1]. My aim is to create the most realistic historical option prices possible with publicly available data. I want to do this for backtesting purposes. The following paper gives a good master plan how to backtest option strategies with the standard Black Scholes formula. ...
thanks a lot for your discussions on the original post. following your suggestions, let me re-phrase a bit : kdb is known for its efficiency, and such efficiency comes at a terrible price. However, with computational power so cheap this days, there must be a sweet spot where we can achieve a comparable efficiency...
Yes, the weights of the first eigenvector of a covariance matrix represent the market factor and also the largest source of systematic risk (variation of returns). Why PCA? Well, PCA simply identifies the eigenvector that maximally explains the variance of the system. It turns out that this is the "market factor" - ...
Let the Black-Scholes formula be defined as the function $f(S, X, T, r, v)$. I'm curious about functions that are computationally simpler than the Black-Scholes that yields results that approximate $f$ for a given set of inputs $S, X, T, r, v$. I understand that "computationally simpler" is not well-defined. But ...
Suggest you avoid using the VIX for implied vols. Why? One has to consider that the VIX is not simply solely dependant on the dynamics on the S&P 500 any-more, because the VIX can be traded via options etc, many more parameters affect the trajectory of the VIX. The VIX has to equal the ATM option vol because this is wh...
I suggest you avoid using the VIX for implied vols. Why? One has to consider that the VIX is not simply solely dependant on the dynamics on the S&P 500 anymore because the VIX can be traded via options, etc. Thus many more parameters affect the trajectory of the VIX. The VIX has to equal the ATM option vol because this...
Yes, the weights of the first eigenvector of a covariance matrix represent the market factor and also the largest source of systematic risk (variation of returns). Why PCA? Well, PCA simply identifies the eigenvector that maximally explains the variance of the system. It turns out that this is the "market factor" - ...
I want to experiment with some portfolio modelling and I was wondering if you guys could help me with something. If I try to estimate and implement the traditional two-fund portfolio consisting of one "risk free" and one risky asset, I will according to the theory end up with the following weight for the risky part of ...
Do weights from portfolio theory contain bias?
I want to experiment with some portfolio modelling and I was wondering if you guys could help me with something. If I try to estimate and implement the traditional two-fund portfolio consisting of one "risk free" and one risky asset, I will according to the theory end up with the following weight for the risky part of ...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. In other words, if we bin the alpha forecast into 10 equally sized frequency bins, we find that bi...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. In other words, if we bin the alpha forecast into 10 equally sized frequency bins, we find that bi...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. If we bin the alpha forecast into 10 equally sized frequency bins, we find that bin 1 has the lowe...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. If we bin the alpha forecast into 10 equally sized frequency bins, we find that bin 1 has the lowe...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. If we bin the alpha forecast into 10 equally sized frequency bins, we find that bin 1 has the lowe...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. If we bin the alpha forecast into 10 equally sized frequency bins, we find that bin 1 has the lowe...
This may be more applied math rather than finance focused, but I'm curious about using linear algebra techniques for generating possible arbitrage signals among outright instruments and spreads/flies based off these outrights (take for instance, Eurodollar futures, and their calendar spreads and butterflies). In the...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. If we bin the alpha forecast into 10 equally sized frequency bins, we find that bin 1 has the lowe...
Here's an interesting trading puzzle that I would love to get the community's input on. Let's say there exists an alpha signal that does a good job of sorting equities expected excess returns over some number of weeks. If we bin the alpha forecast into 10 equally sized frequency bins, we find that bin 1 has the lowe...
Interesting question! I don't think you will get very far just using mid prices, though...any sufficiently sensitive test will nearly every situation as an arbitrage since $A_\text{mid}+B_\text{mid} \neq (A+B)_\text{mid}$ in most cases. Instead, what about viewing each price set as a dimension in $n$-dimensional sp...
In an interview from '96 Bill Eckhardt points out that there are tests that any system must pass to be taken seriously. That is: tests for (1) overfitting, (2) post-dictiveness, (3) maldistribution of returns, (4) statistical artifacts and (5) the degree to which a system takes advantage of unusual and possibly nonre...
In an interview from '96 Bill Eckhardt points out that there are tests that any system must pass to be taken seriously. That is: tests for (1) overfitting, (2) post-dictiveness, (3) maldistribution of returns, (4) statistical artifacts and (5) the degree to which a system takes advantage of unusual and possibly nonre...
In an interview from '96 Bill Eckhardt points out that there are tests that any system must pass to be taken seriously. That is: tests for (1) overfitting, (2) post-dictiveness, (3) maldistribution of returns, (4) statistical artifacts and (5) the degree to which a system takes advantage of unusual and possibly nonre...
In an interview from '96 Bill Eckhardt points out that there are tests that any system must pass to be taken seriously. That is: tests for (1) overfitting, (2) post-dictiveness, (3) maldistribution of returns, (4) statistical artifacts and (5) the degree to which a system takes advantage of unusual and possibly nonre...
Is there a technique to choose the time-frame for a cointegration test (eg Augmented Dickey-Fueller's)?
I have never read about any formal procedure for this. And, I don't remember this issue is even treated in C.Alexander's book Market Risk Analysis, Practical Financial Econometrics that dedicate a whole part to the cointegration of financial time series. One may well find tests for cointegration succeeding (failing) fo...
To put your above mentioned points into perspective you should definitely consider this seminal paper from Attilio Meucci which develops a general framework for trading systems:<br> [‘The Prayer’ Ten-Step Checklist for Advanced Risk and Portfolio Management][1] From the abstract:<br> "We present “The Prayer”,...
Interesting question! I don't think you will get very far just using mid prices, though...any sufficiently sensitive test will flag nearly every situation as an arbitrage since $A_\text{mid}+B_\text{mid} \neq (A+B)_\text{mid}$ in most cases. Instead, what about viewing each price set as a dimension in $n$-dimension...
Below is a spread built with two ETFs that pass the cointegration test i.e. Adjusted Dickey Fuller, adfTest(type="nc") in R's fUnitRoots with a p-value < 0.01. The red line is the trendline. What test can I use to proove that: (1) both securities are cointegrated and (2) they are mean reversing and the mean is co...
Two prices pass the cointegration test but there is a trend. How to check stationarity?
I think applying ML techniques to Finance is a work in progress and here are my arguments: 1. Things like fraud detection are already implemented using ML (personal experience). It should be possible to train a classifier that would tell you when to (or not to) trade. 2. Have a look at this site http://www.kaggle...
I have been playing around with autoregressive conditional duration (ACD) models and I have a nicely working R based implementation using real high frequency data (trades only data). However, what's the point with modelling duration between trades? Or even volume durations? Any idea how this stuff could be used ...
You can consider the following two methods: - If you have Matlab, you can use the following code: [Volume Weighted Average Price from Intra-Daily Data](http://www.mathworks.com/matlabcentral/fileexchange/36115-volume-weighted-average-price-from-intra-daily-data) > This package allows you to [1] retrieve intra-dai...
This question is for a part answered by a recently published article: [High-Frequency Technical Trading: The Importance of Speed](http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2013789) >This paper investigates the importance of speed for technical trading rule performance for three highly liquid ETFs listed ...
Has anyone in the quantitative finance or financial engineering community studied the effects of a bid or ask tax with actual or simulated data? If so, what were the predicted quantitative results on the market? The kind of data I am curious about could arise as part of a before/after study of a market adopting...
Quantitative before/after or financial engineering studies of a bid or ask tax?
Has anyone in the quantitative finance or financial engineering community studied the effects of a bid or ask tax with actual or simulated data? If so, what were the quantitative results or predictions for the market? The kind of data I am curious about could arise as part of a before/after study of a market ad...
Has anyone in the quantitative finance or financial engineering community studied the effects of a bid or ask tax with actual or simulated data? If so, what were the quantitative results or predictions for the market? The kind of data I am curious about could arise as part of a before/after study of a market ad...
Has anyone in the quantitative finance or financial engineering community studied the effects of a bid or ask tax with actual or simulated data? If so, what were the quantitative results or predictions for the market? The kind of data I am curious about could arise as part of a before/after study of a market ad...
Has anyone in the quantitative finance or financial engineering community studied the effects of a bid or ask tax with actual or simulated data? If so, what were the quantitative results or predictions for the market? The kind of data I am curious about could arise as part of a before/after study of a market ad...
Has anyone in the quantitative finance or financial engineering community studied the effects of a bid or ask tax with actual or simulated data? If so, what were the quantitative results or predictions for the market? The kind of data I am curious about could arise as part of a before/after study of a market ad...
You can consider the following two methods: - If you have Matlab, you can use the following code: [Volume Weighted Average Price from Intra-Daily Data](http://www.mathworks.com/matlabcentral/fileexchange/36115-volume-weighted-average-price-from-intra-daily-data) > This package allows you to [1] retrieve intra-dai...
Yes there is some research on it, take for example The Ten Commandments for Ranking University Quality by Michael McAleer http://papers.ssrn.com/sol3/papers.cfm?abstract_id=785441
Many academics argue that end-to-day trading, where you go long or short before opening and sell your security at the end of the day, is not profitable. Various explanations are given for this concern. For instance, - macro-economic news during the day is likely to change the course of a share that day - in that sens...
Can end-to-day trading be profitable? If not, why?
Many academics argue that end-to-day trading, where you go long or short before opening and sell your security at the end of the day, is not profitable. Various explanations are given for this concern. For instance, - macro-economic news during the day is likely to change the course of a share that day - in that ...
In fact if you make the time change $$t\rightarrow \int_{\tau\leq t} V_\tau d\tau$$ a TWAP is a VWAP. So just define the FWAP associate to a transform F: (you should ask to F to be an adapted stochastic process if you want to use models) $$t\rightarrow \int_{\tau\leq t} F(\tau) d\tau$$ You will have a new ben...
In fact if you make the time change $$t\rightarrow \int_{\tau\leq t} V_\tau d\tau$$ a TWAP is a VWAP. So just define the FWAP associate to a transform F: (you should ask to F to be an adapted stochastic process if you want to use models) $$t\rightarrow \int_{\tau\leq t} F(\tau) d\tau$$ You will have a new ben...
The main issue measuring intraday volatility is called "signature plot": when you zoom in, the volatility measure (i.e. empirical quadratic variations) explode. Similarly you have the "Epps effect" for correlations: when you zoom in, the correlations collapse (it is at least a mechanical effect). For the volatili...
We have had several posts on [cointegration][1], and I must admit that I have only seen them mentioned here and there but I have no real experience using this concept. My question is pretty simple: how do you use cointegration to create strategies? In other words, in what fields are you using this concept? ...
What are the applications of cointegration?
I am trying to get the IV from options on commodity futures. I know it's possible to get the IV from binomial american options (on an non-dividend paying stock). I believe it is using the bisection method, however, I can't seem to find a paper illustrating this. Can someone point me to relevant paper/book?
I am trying to get the implied volatility from options on commodity futures and I know it's possible to get it from the binomial american options (on an non-dividend paying stock). I believe it is done using the bisection method. However, I can't seem to find a paper illustrating this. Can someone point me to rel...
Yahoo finance conveniently provides [historic ratings][1] from a number of analysts. Unfortunately, each analyst seems to use a different scale: buy/hold/sell, perform/outperform/neutral, overweight/equal weight/underweight, etc. I've already [written a function][2] to scrape this data into R, and I would like to e...
If you haven't already, I would check out Nikolaus Hautsch's book: Modelling Irregularly Spaced Financial Data [1]. I have just started reading it, but it looks like he devotes a good portion of the book to going through real world applications of ACD models. I work at a market maker and spend a bit of my time analy...
What are the methods for optimizing the stop-loss reinsurance. I found an article on the minimization of the variance. I also know about the method of average-at-range. We apply a method for single-level contract KNST stopp-loss?
What are some methods for optimizing stop-loss reinsurance? I've found an article on the minimization of the variance. I also know about the method of average-at-range. Can we apply a method for single-level contract KNST stop-loss?
Not sure if this is a relevant question or not, but I am looking at www.eoddata.com. If anyone has used it, can you tell me how the data quality is ? I am currently parsing yahoo for my prices but its not a very efficient process. What are the other sources of equity data out there ( affordable for retail investors lik...
Not sure if this is a relevant question for this forum, but I am looking to move to www.eoddata.com as my data source. If anyone has used it, can you tell me how the data quality is ? I am currently parsing yahoo for my prices but its not a very efficient process. What are the other sources of equity data out there ( ...
Before asking any question about cointegration, please read this paper: [A Drunk and Her Dog: An Illustration of Cointegration and Error Correction by Michael P. Murray in The American Statistician, Vol. 48, No. 1 (Feb., 1994), pp. 37-39][1]. From the viewpoint of the users of quant.stackexchange, questions on coint...
Not sure if this is a relevant question for this forum, but I am looking to move to www.eoddata.com as my data source. If anyone has used it, can you tell me how the data quality is ? I am currently parsing yahoo for my prices but its not a very efficient process. What are the other sources of equity data out there ( ...
Not sure if this is a relevant question for site, but I am looking to move to [www.eoddata.com][1] as my data source. If anyone has used it, can you tell me how the data quality is ? I am currently parsing yahoo for my prices but its not a very efficient process. What are the other sources of equity data out ...
Is "eoddata" a good data source?
It seems that you speak about a "quote tax". In Europe some markets now ask for fees for orders even if they are not executed if you exceed an order to trade ratio to prevent them from cpu-harrassing flows. Let s wait and see what will append. The effect should be similar to the One of a tax. The real question is...
Given an expected returns vector and a covariance matrix, one can perform draws and measure the average *cross-sectional* variation across returns for a particular draw. What is the analytical relationship between a given covariance matrix and expected returns vector (i.e. a multivariate normal distribution) and the...
Given an expected returns vector and a covariance matrix, one can perform draws and measure the average *cross-sectional* variation across returns for a particular draw. What is the analytical relationship between a given covariance matrix and expected returns vector (i.e. a multivariate normal distribution) and the...
Given an expected returns vector and a covariance matrix, one can perform joint draws and measure the average *cross-sectional* variation across returns for a particular draw. What is the analytical relationship between a given covariance matrix and expected returns vector (i.e. a multivariate normal distribution) a...
Hedge the risk of low-volatility by engaging in a [variance-swap][1]. Peter Carr and Lurien Wu wrote "[Variance Risk Premia][2]" on the topic. [1]: http://en.wikipedia.org/wiki/Variance_swap [2]: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=577222&http://en.wikipedia.org/wiki/Variance_swap
Given an expected returns vector and a covariance matrix, one can perform a joint draw and measure the average *cross-sectional* variation across returns for a particular draw. What is the analytical relationship between a given covariance matrix and expected returns vector (i.e. a multivariate normal distribution) ...