instruction
stringlengths
35
27.7k
I would like to ask "how to do GARCH modelling on stata". Basically I want to estimate stock market volatility using daily data. I have one variable as return series, $r_t=\ln(\frac{P_t}{P_{t-1}})$. I need a step by step explanation.
I am designing an asset allocation strategy/fund which invests in four asset classes (via four independent sub-funds): Domestic equity International equity Domestic fixed income Foreign currencies The strategy must be fully invested in these four funds at all times. I already have a default "strategic" allocation to...
I m doing my research on estimating Value at risk using different assumptions on volatility and then compare my results based on backtesting. I obtained results and just on question based on my results. The different models estimates accurately in 5% confidence level rather than 1%.. Is it common result? Because the sa...
Market making often requires placing and canceling a lot of orders. You have to buy and sell nearly simultaneously, so you need to move orders pretty often to beat other traders. But I would like to optimize my strategy, minimizing the number of orders placed while maximizing the total volume of deals. Otherwise I ...
One of the greatest achievements of modern option pricing theory is finding corresponding dynamical trading strategies in linear instruments with which you can replicate and by that price derivative instruments; of course the most prominent example being Black Scholes and dynamic hedging. I wonder concerning another tr...
I trade on local exchanges in Europe, but my HFT strategies need S&P 500 e-mini futures data (ES). I don't need to trade ES, but I need real-time data and I want to have it as fast as possible. I've tried http://www.zen-fire.com/ and it works fine, but probably something better exist? Or maybe (just maybe...) I can use...
I have some market data (daily time series) for bond prices and CDS indices and I would like to generate synthetic versions of these which are statistically "similar" for testing trading strategies. Is there literature on this subject?
I am guessing the short answer to this question is "use the chain rule and linearity of the derivative," but I am looking for more specific advice on how to compute the derivatives of a VIX futures contract. Roughly speaking, the VIX index represents a rolling weighted position in a bunch of S&P call & put options at d...
When holding vanilla options, you can cancel out, theoretically, all risk with dynamic (delta) hedging. Then you earn the "risk free rate of return". Why would you make such a portfolio when you can simply buy a bond that earns the "risk free rate of return"?
The question is inspired by yesterday's (06/09/11) historic announcement by the Swiss National Bank that it would impose a ceiling on the franc of 1.20 against the euro. I would like to know if there are any standard models to value currency options and quantos when the currency exchange rate is effectively capped by t...
What tools exist for order book analysis and visualization? In particular, if one wanted to examine a limit order book and understand how it changes throughout the day where would you turn for software help? I've not found anything off the shelf, but I'm curious if others in this community might know of something. My p...
I hear a lot about Q/kdb+. I've never had the opportunity to use it for anything real but have played with it using their trial license and found it intriguing (if not somewhat mind warping). I've seen a few references to the J language which is also a derivative of APL according to Wikipedia and have heard of at least...
Some people claim that the data-generating process for stocks is a "martingale" and that is has the "Markov property". Are they unrelated? Is it that the Markov property implies some sort of martingale property, or is it the other way around? How do you statistically test for such properties? How far from reality is it...
Suppose one has an idea for a short-horizon trading strategy, which we will define as having an average holding period of under 1 week and a required latency between signal calculation and execution of under 1 minute. This category includes much more than just high-frequency market-making strategies. It also includes...
In their 1990 book, A Non-Random Walk Down Wall Street, Andrew Lo and Craig MacKinlay document a number of persistent predictable patterns in stock prices. One of these "anomalies" is variously known as lead-lag or serial cross-correlation, and it says that the returns of larger, more liquid stocks tend to lead the re...
http://billing.finance.yahoo.com/realtime_quotes/signup?.src=quote&.refer=quote Can i get real time data(from NSE india) using Yahoo finance API after subscribing to their service ?
I'm working on a tool to price Credit Default Swaps. I've already done the standard pricing tools. I'm working on a pricing tool which uses the credit rating for the default probabilities used in the pricing of CDS. What is the relation between these probabilities and the price?
I am looking for an all-java implementation of black scholes, preferably open source. I found jquantlib and quantlib (C++). Any other recommendations? The jquantlib site seems to be down. I'd prefer to stay away from a C++ implementation that runs on a jvm like quantlib seems to be. My team would like to look at the co...
I need to estimate cumulative earnings over the next Y years and I'd like to find a solution that is theoretically sound and relatively simple. Can anyone recommend an approach? Given: I have 30 years of historical monthly earnings.
There are many approaches to estimating fundamental factor equity models. I would like to focus on two traditional methods: The time-series regression approach of Fama and French. Factors are defined ex ante. Betas to the factors are estimated in the time-series. The Barra cross-sectional regression approach describe...
I'm writing the Bachelor thesis but I need some information. I need to find some practical examples and applications of the Compound Poisson Process in insurance. Does anyone have any good examples?
Consider two statistically identical strategies (identical information ratios, sample size, ratio of transaction costs to total profit, etc.) except that one has a much shorter average holding period. Is there a statistical reason to favor one over the other? At first blush, it would appear the statistical confidence ...
Possible Duplicate: Is there an all Java options-pricing library (preferably open source) besides jquantlib? Can anyone recommend a library with an implementation of Black Scholes and Monte Carlo in Java? Ideally something that is Java only and doesn't require a C++ dll or .so or .lib etc.. I've posted a similar que...
I am at the moment considering investing into ETFs, but I am looking first to understand how these products really work. Indeed, it is my understanding that ETF can vary in terms of structure, thus affecting their counterparty risk. For example, some of them are doing a SWAP with a third counterpart to whom they have ...
I have an upcoming quantitative trading interview (prop desk at a large bank), and I would like to have some good questions to ask about the group. However, I am changing fields from academia and I do not have a good idea about what sort of things I should be looking for, and what questions would 1) probe my fit with t...
I'm working on a small application that will provide some charts and graphs to be used for technical analysis. I'm new to TA but I'm wondering if there is a way to algorithmically identify the formation of certain patterns. In most of the TA literature I've read the authors explain how to identify these patterns visual...
I am a Linux user, and taking an investment and portfolio management course that uses excel. I was wondering if there are open source alternatives to excel for optimal portfolio calculations? If yes, are they used basically the same way as excel?
Imagine that prior to entering the market you know beforehand the profit factor of similar situations. For example: trades similar to TRADE 1 have yielded a 1.2 pf trades similar to TRADE 2 have yielded a 2.0 pf What is the best way to manage lot sizes for the two different trades relative to each other? The obvious...
I am attempting to evaluate and compare the profit factor of different "test runs" of a FOREX trading strategy. My problem is that, despite an average time between orders of 2hr+, some of these runs can have 20+ orders in a row, every 5 minutes, in the same direction. I need some way to normalize these clusters that oc...
There exist several volatility indices, such as the CBOE Volatility Index (VIX). There are also options on such indicies. What is the best way to price a volatility-index option? Is there a simple model that works well in terms of performance and precision?
I'm progressing, all too slowly, on a site that aims to show real-time numbers for options that are listed on the CBOE. Most of the instantaneous numbers are all set. Now I'm going to pay attention to some of the trends in those numbers: option price, volume, put-call ratio, open interest, and similar. One of the sets ...
Are there any "standard" VaR calculations run in a batch? For example, testing a VaR calculation with a lag of 1,2, 5 or 10 days over 2 years? Same question for the percentile, 1%, 2.5%, 5% etc.
Perusing the other SE network sites, particularly Programmers, I often find vigorous support for various agile software development methodologies, particularly the various values known as Extreme Programming (I'm thinking of unit testing, coding standards, etc. and also SOLID principles, variable naming consistency). ...
Reading up on quantitative methods, model development, and back-testing, one obvious question springs to mind: What should one ask of a prototyping (model testing) framework? I know a lot of people use R, C/C++ and so on for testing, but does one have to re-invent everything or are there some features, such as basic st...
If a company issues commercial paper and the bookkeeper, bank A, receives a buy order from bank B, in which bank B creates credit to buy the commercial paper, does the company has a credit in bank B or does bank B owe himself and has the asset of the commercial paper?
Beyond optimal / partial f and a few other older methods, there's very little information out there for futures trading.
My question is pretty simple: what papers do you feel are foundational to quantitative finance? I'm compiling a personal reading list already, drawn from Wilmott forums, papers referenced in Derivatives, and other sources. However, the body of research is immense, especially in recent years, so I'm interested in wha...
Question: if VIX is the Implied Volatility of SPX, 30 days in the future, how many days into the future does VIX vol look? +60 or +30? Lets see if I'm on the right track: Premise 1: VIX is the Implied Volatility (IV) of SPX, looking +30 days into the future (actually, technically VIX is a variance swap, but for all in...
Let's say I have one strategy that has a hedging error of: 2, 2, -2, -2 Let's say I have another strategy that has a hedging error of .5, .5, 3, 3 Would it be a better idea to grade the hedging strategies based on the sum of hedging errors (absolute value) or the sum of squares of hedging errors? Why?
And, in a second round, what is the origin of the "long" and "short" in characterizing the respective positions in assets? Any pointers to etymology, first occurrences, or related literature would be greatly appreciated.
My objective is to measure the modified-CVAR for a portfolio given its weights and matrix of security returns. Luckily the wonderful package PerformanceAnalytics has an ES() function that does just this. The issue I am having is that modified-CVAR takes minutes to compute, when according to this paper (by the same aut...
Commercial risk models (e.g., Barra, Axioma, Barclays, Northfield) have evolved to a very high level of sophistication. However, all of these models attempt to solve a very broad set of problems. The optimal risk model for, say, risk attribution in a fundamental portfolio may differ substantially from the optimal ris...
I have been trading (mostly equity and equity index) options for a while now and I want to apply a slightly more quantitative approach to my trading - specifically, by calculating IV and incorporating it into my decision making process. BTW, I am referring to a "bog standard" BS model for exchange traded european and a...
Yahoo finance conveniently provides historic ratings 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 to scrape this data into R, and I would like to expand it by a...
I am in the process of building zero coupon curves for some countries in the Eurozone. I have the following data sets: Euribor and EONIA Swap rates Bond price and yields The bond prices (and thus yields) reflect the relative credit worthiness of the sovereign issuer (a point that has come to the fore most recently). ...
What are some quant theoretical or empirical insights that have shaped your thinking or provided a deeper conceptual basis for explaining returns and risk?
Possible Duplicate: What data sources are available online? Is there a free way to download the current prices (and possibly other data) for stocks for various companies? Context: This is for a data source for a group programming project for a class. We weren't assigned this project or even a list of projects to pi...
Can anyone recommend books that explain the math used in quantitative finance academic papers?
How do you distinguish between losses that are within the normal range for day-to-day shifts and situations with a real potential for loss? The specific application I have in mind is pattern recognition-based algorithmic trading.
I am currently trying to understand the in's and out's of options and more specifically hedging. I came across a document that was talking about Delta Hedging which is just making sure the delta of your overall position will be 0. But how do you hedge Omega(Time)?
Forewarning: this is a complete newbie question :-) I am starting to learn about ETFs by trying to do the numbers. When learning about the compounding effect in leveraged ETFs, I wanted to simulate the return for a simple ETF. Here is what I wanted to do: a hypothetical index ETF gains 1% every day for a 10-day range. ...
You want to construct an optimal portfolio. Let's say you have an alpha signal that arrives with some period (say quarterly). The alpha signal predicts arithmetic returns one-year ahead. You have risk estimates that are updated daily. The optimizer your utility function is maximizing is expected returns from the quart...
When looking at the Price-vs-Yield graph for a fixed rate instrument, we are often told that the duration is the slope of that curve. But is that really right? Duration is (change in price) divided by (price times change in yield). That's hardly the slope of the curve which would be (change in price) divided by (change...
I did check the related posts, like this one here. However, given if one already has knowledge in finance, machine learning and statistics, and wants to know something more advanced on machine learning based trading rather than the introductory. What would you recommend? I am looking for anything related: excellent bo...
I have heard that the SABR volatility model was not good at pricing a constant maturity swap (CMS). How is that?
There are a lot of Quantitative Finance models (e.g. Black-Scholes) which are formulated in terms of partial differential equations. What is a standard approach in Quantitative Finance to solve these equations? Do people use some general packages for solving differential equations (like Maple, MATLAB or Mathematica)? O...
In theory, how should volatility affect the price of a binary option? A typical out the money option has more extrinsic value and therefore volatility plays a much more noticeable factor. Now let's say you have a binary option priced at .30 as people do not believe it will be worth 1.00 at expiration. How much does vo...
I am looking for data on market participants at a particular moment (or some proxy/approximation). For example, how can I tell whether mostly big players and HFTs are dominating the market in particular time frame or whether there is a considerable amount of "human" trading. I would like this data at as high a frequenc...
I have a process that estimates the parameters for the following function using the NL2SOL algorithm. $C-[\alpha+\frac{\beta-\alpha}{1+e^-\theta(y_t-\delta)} \vartriangle y_t]$ The process currently holds $\alpha$ and $\beta$ constant, so only $C$, $\theta$, and $\delta$ are being estimated. The parameters are general...
How do you use bond prices/yields to infer probabilities of default? I would think of it as follows: Create a relationship between default free (e.g., Germany) and defaultable (e.g., Greece) bond prices and solve for $p$: $$\begin{eqnarray} \tilde{B}(0,T) = B(0,T)rp + B(0,T)(1-p) \\ \frac{1}{1+\tilde{y}} ...
I have a sample covariance matrix of S&P 500 security returns where the smallest k-th eigenvalues are negative and quite small (reflecting noise and some high correlations in the matrix). I am performing some operations on the covariance matrix and this matrix must be positive definite. What is the best way to "fix" t...
I ran a Johansen cointegration test on 3 instruments, A B and C. The results that I got are: R<=x | Test Stat 90% 95% 99% r=0 --> 36.7 18.9 21.1 25.8 r=1 --> 8.4 12.29 14.26 18.52 r=2 --> 0.21 2.7 3.8 6.6 EigenValues EigenMatrix 0.03 --> 0.25 | 0.512 |-0.79 0....
It's not clear to me how to realize skewness. In other words, how do you implement skew arbitrage? There seems to be no well-known recipe like in volatility arbitrage. Volatility arbitrage (or vol arb) is a type of statistical arbitrage implemented by trading a delta neutral portfolio of an option and its underlier. ...
Sorry if the question sounds rough. It's not my intention to devaluate something I've not yet understood like Quantitative Finance. So to keep it simple: is Quantitative Finance a science, like Math or Physics? Or is it something more similar to Technical Analysis, but with much more math into it? I know Technical An...
Bakshi et al., (2006) Estimation of continuous-time models with an application to equity volatility dynamics (Table 2) estimate the following Cox-Ingersoll-Ross model for market variance, $\sigma^2_t$: $\mathrm{d}\sigma^2_t = (\alpha_0 + \alpha_1\sigma^2_t)\mathrm{d}t + \sqrt{\beta_1}\sigma_t\mathrm{d}W_t$ To estimate ...
Expectancy is defined as "How much money gained for every $1 risked". What is the expectancy for this particular series of trades? Risked €1, won €2 Risked €2, won €1 Risked €3, won €6 Risked €3, won €6
In recent months I've come to the conclusion that there are not only certain regimes in the markets (like bear or bull) but phases where all models fail because we are in uncharted territory. The former are pockets of predictability, as I like to call them, the latter are phases where it is best to stay out of the mark...
I am finishing the implementation of a limit order book for modeling NASDAQ. The order book works off of the ITCH feed. My question is what techniques are typically used for testing order books. I am considering two methods primarily. Build a canned set of messages to test the functionality and test possible edge case...
There's various research showing how priors such as the minimum variance portfolio turn out to be a surprisingly effective shrinkage target in portfolio construction. The sell point of these priors is they do not require a return estimate. Therefore these shrinkage targets add ballast to otherwise noisy return estimat...
Even companies with just a single non-callable corporate bond outstanding will often have CDS quote spreads that differ from the bond quote spread. During the 2008 crisis, there were dozens of cases where true arbitrages were available. You could argue these arbitrages were due to forced selling of bond inventory (a f...
I am backtesting an equity trading strategy which trades only once per day. Is there a general rule of thumb for the reasonable upper bound on the rate of return of such a strategy? For example, a 2000% return over a week might be unrealistic, but a 20% return is possible. Identifying a reasonable limit may help me ...
I need to calculate the put-call ratio for an American option. But I'm a complete naïf: I don't know how. I think I'd use the put open interest and the call open interest. I can imagine two ways to calculate PCR: Simply (as some references tell me) take OIputs divided by OIcalls and there's my number, right there: PCR...
Where can I get data on performance metrics for volatility arbitrage funds? I am trying to compare the Sharpe ratio of my strategy to those of the major players.
I have a question considering Financial markets in discrete Time. One of the main theorems in discrete time is the following. In finite discrete Time with trading times t={1,...,T} the following are equivalent: The market $(S,\mathbb{F})$ is complete, i.e every $F_T$-measurable random variable $U$ is replicable and T...
I'm reading a book titled "A Trader's Money Management System" and it discusses risk of ruin(ROR) tables. It says that you can have a zero probability of ROR with a payoff ratio of 2 to 1 and a win rate of 60%. My understanding is that the concept of ROR originated in gambling, but is it applicable to trading and more...
I'm trying to find an optimal way to allocate capital among trading strategies. "Quantitative Trading" by Ernie Chan claims on page 97 that the optimal fraction of capital to allocate to a given trading strategy can be calculated by the following formula. f = μ/σ2, where μ is the mean and σ2 is the variance of the r...
I am a programmer and I have no finance background. I am looking for advice as to how to get started in the quant finance industry. My goal would be to have solid understanding about the industry and be able to program something interesting, side project projects. But so far I have no idea how to get started. So far I ...
I'm wading through the vast sea of literature on realized volatility estimation and expected volatility forecasting (see, e.g. Realized Volatility by Andersen and Benzoni, which cites 120 other papers, and Volatility by Bandi and Russell, which cites a slightly overlapping set of 120 papers). I'm having a tough time fi...
I have to implement option pricing in c++ using Markov chain Monte Carlo. Is there some paper which describes this in detail so that I can learn from there and implement?
I'm building an algorithmic trading business. I'd be grateful for informed comments and opinions on my trading strategy search methodology. Goal Develop (profitable!) fully automated intra-day trading strategies. Markets I'm focusing on FX futures and equity index futures on CME and LIFFE. Becuase: I know these marke...
Sell-side analysts' earnings estimates for individual companies, typically reported by I/B/E/S, are a key ingredient to many quantitative models. However, revisions to analyst estimates tend to lag changes in market expectations. Basing a model's recommendation on these estimates, particularly for valuation, can ofte...
Suppose I have two asset time series, $X_t$ and $Y_t$, and I'm estimating their correlation from historical data. I'd like to apply some systematic criterion to estimate what time window I should use to estimate the correlation reliably, and also to spot "regime changes" (when the correlation jumps suddenly) after whic...
From the text book Quantitative Finance for Physicists: An Introduction (Academic Press Advanced Finance) I have this excercise: Prove that $$ \int_{t_1}^{t_2}W(s)^ndW(s)=\frac{1}{n+1}[W(t_2)^{n+1}-W(t_1)^{n+1}]-\frac{n}{2}\int_{t_1}^{t_2}W(s)^{n-1}ds $$ Hint: Calculate $d(W^{n+1})$ using Ito's lemma. This is my calc...
Assume a stock had an open of \$100 and a close of \$102. If the high of the day was \$103 and the low was \$99, the daily range is obviously \$4. What is the best way to express the daily range in terms of percentage? If you take the range and divide it by the open, you get 4.00%. If you take the high and divide it by...
My data source for end of day prices only gives the prices of the trades during the day. If a stock stops trading/goes out/moves to another exchange|changes symbol. I never hear about this. My question(s) are: Is there a way to determine that a stock is no longer trading? Most stocks that I have, have daily updates t...
Seasonality is a big deal in the natural gas markets. My understanding is that they are broadly divided into summer and winter, with seasonality in both price and the volatility. What does this translate into in terms of skews or volatility surfaces? What implications are there for hedging? And how do the options ma...
I'm using a binomial tree to price a bond that has an embedded call or put option. On every node that has a coupon payment, do you include the coupon payment then max/min out the value, or do you max/min out the value then apply the coupon? My guess is that for a call option, the issuer will make sure the value to the ...
How can one determine approximately what percentage of options trades are buyer-initiated vs. seller-initiated? What measures of order flow are available specifically for options, preferably for individual contracts covering specific strikes and maturities?
A binary option with payout \$0/\$100 is trading at \$30 with 12 hours to expiration. Assuming the underlying follows a geometric Brownian motion (hence volatility remains constant), what probability distribution describes the option's maximum price between now and expiration? I'm looking for a generic "formula". E...
Beginner question. Having read a couple of papers and book chapters on high-frequency data forecasting, I'm surprised (and confused) that the same time series techniques can be applied to high-frequency/ tick data than for lower frequencies. High-frequency data seems to clearly not follow a normal distribution given t...
Latency has been a hot topic for a while, first in the industry and more recently also in academia. It is very common to hear about milliseconds, even microseconds. While most of the media attention is on equity markets, latency is an important variable in options markets, futures markets, and FX markets (arguably, it...
Which is the most extensible? Which is the most efficient in terms of a minimal learning curve while providing a meaningful degree of flexibility and performance? Any of these tools really limited in terms of customization and worth avoiding?
I have some closing price data for two Australian banks which track each other very closely. http://dl.dropbox.com/u/12337149/stat/CBA.csv http://dl.dropbox.com/u/12337149/stat/WBC.csv Code from this web page produces the following output Assumed hedge ratio is 2.26 ADF p-value is 0.47 When I plot the prices, I obtain...
Possible Duplicate: How to derive the implied probability distribution from B-S volatilities? Let's assume a stock price S, with volatility $\sigma$ constant, no dividend, and risk free interest rate $r$ we have : $ dS=\mu Sdt +\sigma SdW $ And therefore using ito's lemma we get that $\ln(S)$ follows the following n...
Let's say I have time series of stock prices for many stocks. What's the best way to sort the stocks based on which have been going up/stayed the same relative to others? Can this be done with a weighted average, putting more weight on the most recent numbers, to account for trends?
I'm looking for histocial weights of S&P 500 constituents. I have access to a Bloomberg terminal. Any thoughts on how/where I might calculate/find these data? P.S. I'm looking for as much data as possible but at least five consecutive years within the last 15 years. P.P.S. Monthly data.
I was wondering if anyone could help me with the instantaneous forward rate equation for a Black-Karasinski interest rate model? I was also after the Black-Karasinski Bond Option Pricing Formula.
Hi I am looking for a clear explanation of T statistics concept. Especially in quantitative equity portfolio management context, what does T statistics of monthly Information Coefficient for one factor indicate? How can I tell if it is significant, and if it is, any useful information I could derive from that?
Since a market index is nothing more than a basket of stocks, you can create your own index by putting together stocks of your choice. The only difference is that you can trade options on major indexes unlike your custom index. So, I'm wondering if it's possible to use stocks and their options to replicate the option o...
We know that there are 2 types of risk which are systematic and unsystematic risk. Systematic risk can be estimate through the calculation of β in CAPM formula. But how can we estimate the unsystematic risk quantitatively? is there any formula or calculation that can be related to the measurement of unsystematic risk?