instruction
stringlengths
15
26.1k
I was recently reading an article about how financial accounting has increasingly deviated from the ratios expected by Benford's Law. ([Benford's Law and Decreasing Reliability][1]). The author discusses the S&L crisis, but that's not enough to say that Benford's Law is a good predictor of performance. How reliable...
How reliable is Benford's Law in forecasting crises?
I am thinking of writing a VaR framework for my existing system, using quantlib to do the bulk of the calculations. Despite several searches, I have not as yet come across a quantlib VaR implementation. Is anyone aware of a quantlib based VaR implementation that I may be able to use a s a starting point (to prevent ...
VaR implementation using quantlib?
Few quick questions on how locates work. - How do brokerages charge for locates? They charge based on volume? How long you need the locate (I assume an one day is max)? - Do the brokerages actually hold the underlier 1:1 with the potential short? AKA: If I want the ability to short IBM 1...
How do brokers charge for locates?
To quote Wikipedia: > In hyperbolic discounting, valuations fall very rapidly for small delay periods, but then fall slowly for longer delay periods. This contrasts with exponential discounting, in which valuation falls by a constant factor per unit delay, regardless of the total length of the delay. [Hyperbolic ...
Are there any valuation models of securities that use hyperbolic discounting?
>_"...a low volatility environment is usually a good environment for trend following strategies; see Jez Liberty’s state of trend following report here..."_ <http://quantumfinancier.wordpress.com/2010/08/27/regime-switching-system-using-volatility-forecast/> (By the way the volatility is defined as the "std. dev...
Using volatility cycles to switch between trend following & range bound trading?
I have a question concering interest yield curve. Many institutions use the Libor-Swap rate Curve as a yield curve. Lets be precice and say that we want the yield curve to be the curve which gives us the rate at which a well rated bank can lend money for any tenor. When the tenor is less than 12monts then taths basical...
Why use Swap-Rates in a yield curve?
I have a question concerning interest yield curves. Many institutions use the Libor-swap rate curve as a yield curve. Let's be precise and say that we want the yield curve to be the curve that gives us the rate at which a well-rated bank can lend money for any tenor. When the tenor is less than 12 months then that's ba...
Why use swap-rates in a yield curve?
I'm new to finance in general, and recently read about Modern Portfolio Theory. Now I'm wondering how to add the following constraint on asset weights: * Each asset weight $w_i$ should *either* be $w_i = 0$, *or* it should be $0.05 <= w_i <= 1.0$ (With 0.05 as the lower bound just being an example.) From doodl...
Let's say you've got American options on a future of a stock index. There's no dividends, and no risk-free rate either (assume $r=0$). Can these options then be treated as European from the perspective of using Black-Scholes to price them and calculate the Greeks?
Can american options with no dividends/riskfree be treated as european?
we are all from science/engineering background. So let me put it this way. Algorithmic trading is an engineering product, which bring buyer and seller together. Essentially, there is nothing different between automated trading systems and eBay or Amazon. Algo trading is not about providing liquidity. There are p...
I'm new to finance in general, and recently read about Modern Portfolio Theory. Now I'm wondering how to add the following constraint on asset weights: * Each asset weight $w_i$ should *either* be $w_i = 0$, *or* it should be $0.05 <= w_i <= 1.0$ (With 0.05 as the lower bound just being an example.) From doodl...
we are all from science/engineering background. So let me put it this way. Algorithmic trading is an engineering product, which bring buyer and seller together. Essentially, there is nothing different between automated trading systems and eBay or Amazon. Algo trading is not about providing liquidity. There are p...
Let's say you've got American options on a future of a stock index. There are no dividends, and no risk-free rate either (assume $r=0$). Can these options then be treated as European from the perspective of using Black-Scholes to price them and calculate the Greeks?
Can American options with no dividends and zero risk-free rate be treated as European?
I have read and listened alot about latency. But I couldn't find any solid information which explains that how latency is defined and measured? I mean when people say they have achieved milliseconds or nanoseconds latency, its between which two points? Also what methods are used to measure it... We are going to depl...
HFT - How to define and measure latency?
I have read and heard a lot about latency. But I can't find any solid information that explains how latency is defined and measured. When people say they have achieved millisecond or nanosecond latency, which two points is that between? And what methods are used to measure it? We are going to deploy one strategy in ...
When pricing options, what precision should I work with?
So, I'm in need of some tips regarding a small project I'm doing. My goal is an implementation of a Fast Fourier Transform algorithm (FFT) which can be applied to the pricing of options. First concerns: -which FFT, there are a lot of differents Algorithms, which can be called FFT, the most famous one being Coole...
There are all sorts of applications of cointegration to generating alpha on mean-reverting timeseries: comparing spot vs. futures, bond spreads, identifying mean-reverting residuals, etc. But there is not much literature on applying co-integration to portfolio risk. Overwhelmingly, the variance-covariance matrix is ...
There are all sorts of applications of cointegration to generating alpha on mean-reverting timeseries: comparing spot vs. futures, bond spreads, identifying mean-reverting residuals, etc. But there is not much literature on applying co-integration to portfolio risk. Overwhelmingly, the variance-covariance matrix is ...
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...
I have been playing with mean reverting pairs, but seems that most of the low hanging fruit (ie pairs) have been squeezed already. I would like to start with mean reverting baskets (>2 securities) in order to find unexplored, juicier strategies. Please can you guide me recommending books, articles, etc., on how to b...
How to build a mean reverting basket?
In the standard MBA one-period binomial model, the value of an option is $v = \frac{1}{R}\bigl(\frac{u - R}{u - d}V(sd) + \frac{R - d}{u - s}V(su)\bigr)$ where $R$ is the realized return over the period and the stock goes from $s$ down to $sd$ or up to $su$, where $d\lt R\lt u$, and $V$ is the option payoff. Note...
The binomial model is wrong?
When I read about, say, some hedge fund wanting people with such-and-such Sharpe ratio, how is that ratio recorded and communicated to the interested party? I mean, do people just take it on faith that if I say my Sharpe ratio is X, is it so? Or is there some formal process where this can be recorded?
How is someone's Sharpe ratio recorded and communicated?
I am using ITCH protocol to get the Market Data information for Forex and trying to implement LOB on it and what i have noticed is that Bid and Ask prices are crossing very often. Should that be happening in the normal circumstances for Forex trading? or Raw data from the ITCH data stream has to be filtered first manu...
In the standard MBA one-period binomial model, the value of an option is $v = \frac{1}{R}\bigl(\frac{u - R}{u - d}V(sd) + \frac{R - d}{u - d}V(su)\bigr)$ where $R$ is the realized return over the period and the stock goes from $s$ down to $sd$ or up to $su$, where $d\lt R\lt u$, and $V$ is the option payoff. Note...
There are multiple approaches that you could consider. The basic idea across all of them is that you want to find a portfolio that is stationary. In the two-asset case, it is well known how to accomplish this. This paper by Marcelo Perlin describes one approach: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=95278...
Can anyone point me to good, free, intro-level tutorials on leveraged loans and commingled funds (or, alternatively, offer one here :-))? It should describe basic mechanics and -- very importantly -- provide an understanding of the important attributes of these products. A text tutorial is much preferred. This [t...
Tutorials on Leveraged Loans & Commingled Funds?
Pairs trading is just one type of [statistical arbitrage][1] (check out references on wikipedia page). It sounds like you are talking about trading "[factors][2]" against each other. Factors could be industries, size, fundamentals, or purely [statistical][3]. Start with Ed Thorp's [Wilmott articles on statistical ar...
Can anyone point me to a good, free, intro-level tutorial on leveraged loans (or, alternatively, offer one here :-))? It should describe basic mechanics and -- very importantly -- provide an understanding of the important attributes of these products. A text tutorial is much preferred. See [here][1] for a sample ...
Tutorials on Leveraged Loans?
Where are you sourcing your data from? In the equities markets you will see crossed/locked markets at the NBBO if consuming direct feeds from each venue. You typically will not see it at a specific venue, however there are circumstances where you will (for example, NYSE pre-open or during LRP, etc). For FOREX I'd as...
What are some good, preferably free, introductions to leveraged loans or can you give on here? The introduction should describe basic mechanics and *very importantly* provide an understanding of the important attributes of these products. A text tutorial is much preferred. See [here][1] for a sample answer. ...
When you decide if the performance improvement is worth it you can add these to the downside ow using single precision: - the result of your basic B-S pricer will eventually need to be multiplied with a notional and maybe a discount factor; For a sufficiently large notional you will see different results than the on...
Assume you want to create a security which replicates the implied volatility of the market, that is when $\sigma$ goes up, the value of the security $X$. The method you could use is to buy call options on that market for an amount $C$. We know that call options have a positive vega $\nu = \frac{\partial C}{\parti...
Which greeks do you need to hedge if you want to implement an implied-volatility security?
There is experimental code available under https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3413982&group_id=12740 Basically I tried to answer the question if you should do the riskfactor shifts on the level of the pricing engine or on the level of the market data. For me the answer is that one has to ...
Any idea how to estimate GJR-GARCH models in R? Is there any particular library like fGarch that supports such models?
I have some implementations of interest rate lattice models. I would like to verify their performance. What would be the best approaches? Currently I compare pricings of some interest rate dependent derivatives, but is there anything more direct?
Is there a case, where due to illiquidity, exercising (slightly) out of the money options, could be better than directly buying the stock? When a stock (or any other product) is too illiquid, there are some costs due to this illiquidity, because directly buying the stock through a market order, could move the price ...
Is is possible that because of illiquidity, exercising an out of the money, is better than directly buying the stock?
Is there a case, where due to illiquidity, exercising out-of-the-money options could be better than directly buying the stock? When a stock is too illiquid, there are some costs because of this illiquidity. Ie, directly buying the stock through a market order could move the price too much. So, if you exercise opt...
Is it ever possible that---because of illiquidity---exercising an out-of-the-money option is better than directly buying the stock?
Is there a case, where due to illiquidity, exercising out-of-the-money options could be better than directly buying the stock? When a stock is too illiquid, there are some costs because of this illiquidity. Ie, directly buying the stock through a market order could move the price too much. So, if you exercise opt...
I have seen the rationale behind why it is never optimal to exercise an American call option early, but have a question about it. If the option strike price is $E=\$20$ and it expires at $T=1yr$, if the share price is $S=\$25$ at expiry, the profit will be $\$5$ per share. However, what if at $T=0.5yr$ the share pr...
I have some implementations of interest rate lattice models. I would like to verify their performance. What would be the best approaches? Currently I compare pricings of some interest rate dependent derivatives, but is there anything more direct? I'm more interested in accuracy and possibly hedging performance.
Whether or not to exercise an option when the underlying is near the money can be a very complicated problem that depends on much more than simply whether or not the underlying is just over or under the strike price. Options traders refer to this as pinning, which tends to happen much more often than you might expect ...
Consider a Markov Regime-switching process $X_{t}$ with k regimes represented by $s_{t}$ such that <br/> $X_{t}=\mu\left(s_{t}\right)+\epsilon_{t}$ <br/> and $\epsilon_{t}\sim N\left(0,\sigma^{2}\left(s_{t}\right)\right)$ <br/> with the probability of being in state $s_{t}$ represented by $p_{t}=Qp_{t-1}$ where $p...
Consider a Markov Regime-switching process $X_{t}$ with $k$ regimes represented by $s_{t}$ such that $$X_{t}=\mu\left(s_{t}\right)+\epsilon_{t}$$ and $$\epsilon_{t}\sim N\left(0,\sigma^{2}\left(s_{t}\right)\right)$$ with the probability of being in state $s_{t}$ represented by $p_{t}=Qp_{t-1}$ where $p_{t}$...
The original [Nelson Siegel paper][1] describes a parsimonious model of the term structure using only four or three (if $\lambda_t$ is fixed). [Filipovic (1999)][2] proves that this model can never be used in a arbitrage free context, paraphrasing the abstract: > We introduce the class of *consistent state space pro...
**This post is Quant Stack Exchange's master list of data sources.** Please append your links to other data sources to the list below. ## Economic Data ## <br> See [What are the most useful sources of economics data?][1] on Cross Validated. **World** - [OECD.StatExtracts][2] includes data and metadata fo...
OK, so you need to validate a one factor model with mean reversion, here are the questions I would ask myself For calibration Is the model capable of calibrating to both coterminals and caplets? If not how do I intend to calibrate it when pricing Callable Cap Floaters? Is the model capable of calibrating to sk...
Assume $X_t$ is a multivariate Ornstein-Uhlenbeck process, i.e. $$dX_t=\sigma dB_t-AX_tdt$$ and the spot interest rate evolves by the following equation: $$r_t=a+b\cdot X_t.$$ After solving for $X_t$ using $e^{tA}X_t$ and Ito and looking at $\int_0^T{r_s\;ds}$, it turns out that $$\int_0^T{r_s\;ds} \sim \mathcal{...
Why isn't the Nelson-Siegel model arbitrage-free?
Is there a closed-form solution for the partial autocorrelation function of a Markov regime-switching process?
What are some good, preferably free, introductions to leveraged loans, also known as syndicated loans or bank loans? The introduction should describe the basic mechanics and *very importantly* provide an understanding of the important attributes of these products and how they may be modeled.
Where to find introductory material on leveraged loans?
I am really having a terrible time applying Girsanov's theorem to go from the real-world measure $P$ to the risk-neutral measure $Q$. I want to determine the payoff of a derivative based an asset which is paying dividends, so the dividends will affect the value of the asset by changing the drift negatively, but aren'...
How does one go from measure P to Q(risk-neutral) when modeling an asset paying dividends?
I am really having a terrible time applying Girsanov's theorem to go from the real-world measure $P$ to the risk-neutral measure $Q$. I want to determine the payoff of a derivative based an asset which is paying dividends, so the dividends will affect the value of the asset by changing the drift negatively, but aren't ...
Correlation measures how much two series move together over a fixed interval. Are there any techniques that measure co-movement over a variable time frame? One technique I am aware of is concordance.
ad) "Is it normal to assume no other drift?" Under measure P you might have drift. You could use it as a working assumption, but in general indices drift every now and then. So, no, usually you do not assume away the drift. "The index is described as "following a geometric Brownian motion", which to me says that th...
There is a brief discussion of the two modelling frameworks in [*An Introduction to Economic Capital*][1] by Mohan Bhatia in the "Insurance Risk" chapter. To pull a quote from the "Solvency II versus Basel II" section of that chapter: > Like the regulatory approach to internal models in Basel II, Solvency > II aim...
How do the two modelling frameworks compare? I spent some time developing PD LGD and EAD models for banking portfolios... But I never did insurance modelling project which I suspect is based on Solvency II?
Is there some research resource/group working on benchmarking of software products out there with automated trading and goals of "Advanced alpha generation and execution strategies" incorporating low latency data of the order of milli/micro/nano seconds ?
Resources for Benchmarking Automated Trading Systems available as deltix etc.?
How to model time series which are illiquid - 400 observations (transactions) per 8 hours ? Are there models suitable for this situation which incorporate not only size of the transactions but also their timing ? (or mayby incorporate even volume of transactions)
How to model time series of illiquid stocks - 400 observations (transactions) per 8 hours?
How to model time series which are illiquid - 400 observations (transactions) per 8 hours ? Are there models suitable for this situation which incorporate not only size of the transactions but also their timing ? (or mayby incorporate even volume of transactions) Ok, I'm going to add more details in next two days ...
How to model time series which are illiquid - 400 observations (transactions) per 8 hours ? Are there models suitable for this situation which incorporate not only size of the transactions but also their timing ? (or mayby incorporate even volume of transactions) I'm going to edit this in the next two days and giv...
What is the gold standard econometric model for modeling volume ? In the case of modeling assets price it's definitely GARCH(1,1). Do you know good survey article about econometric models used for modeling volume ?
What is gold standard econometric model for modeling volume?
What is the gold standard econometric model for modeling volume ? In the case of modeling assets price it's definitely AR(1)-GARCH(1,1). Do you know good survey article about econometric models used for modeling volume ?
What is the gold standard econometric model for volume? For example, a common model for price is the autoregressive (AR) model with GARCH(1,1) innovations. Do you know of any good survey articles about econometric models used for modeling volume?
What is a commonly accepted econometric model for volume?
How to interpret results of Johansen Test?
I have two time-series a & b. The objective is to find out whether two series are cointegrated or not. I am using Johansen Test in R to find this out. I am using [urca package](http://cran.r-project.org/web/packages/urca/index.html) of R. Here is the summary of test (trace test with constant intercept): ca.jo(c...
I have two time-series a & b. The objective is to find out whether two series are cointegrated or not. I am using Johansen Test in R to find this out. I am using [urca package](http://cran.r-project.org/web/packages/urca/index.html) of R. Here is the summary of test (trace test with constant intercept): ca.jo(c...
I do a simple example with the follow three series(stocks prices): a = 1, 1.2, 1.8, 1.3, 0.9, 2 b = 56, 58, 63, 61.5, 57.6, 58 c = 105.6, 110, 106.9, 103, 101.2, 107 ok, so let assume those series are the prices of the three stocks, named **A**, **B** and **C**. Now, I do the linear regression do...
How to calculate the weight of the stocks using the linear regression?
Here's a $40 million Twitter-based hedge fund from Derwent Capital Markets: [Twitter-hedge fund article][1] My guess is, you'll get a wide swing of opinions on this scheme. Edit 1 (05/25/2012) ================================= Here's an update on the "Twitter Fund": [Update on Twitter hedge fund][2] N...
Given the price of a call equals to 5 with Strike 100, please find the upper bound (sup) of the digital option with strike 105. I am not sure about the solution, but I write the condition like this, $S\mathcal{N}(d_1)-Ke^{-rT}\mathcal{N}(d_2) = 5$ what's the $\sup{N(d_1+\frac{\ln(\frac{100}{105})}{\sigma\sqrt{...
How to find the upper bound of a digital option given some market data?
It seems that your real question is: *is the PFP (Price Formation Process) diffusive from intraday to weekly sampling rate?* It is a very good question since on intraday, some academics found some multifractal features into intraday returns, meaning that the PFP is not a Geometric Brownian Motion at small scales (ev...
I have implemented a function for calculating historical volatility using close the close method as described by [Haug][1] on page 166. I must admit, I was rather curious about the formula, as most historical vol calculations are simply the standard deviation of the log returns (i.e. the square root of the sum of sq...
I have implemented a function for calculating historical volatility using close the close method as described by [Haug][1] on page 166. When I implemented the formula given by Haug, it resulted in some negative values for the variance. The data I am using is not suspect, so the fault must lie in either: - my impl...
I am referring to the article [here][1]. In a nutshell the article says that using data based on S&P 500 index going back as far as to 1950, dollar cost averaging is performing worse than a lump sump investment. My question is, assuming that the market works according to [random walk hypothesis][2], is it possible t...