# All Questions

96 views

### Why gamma and theta have opposite signs?

I saw some textbooks use B-S equation to explain why gamma and theta have opposite signs in most of the cases. For example, John Hull's classic book. The explanation is, first write B-S equation in ...
2k views

### Calculate Average Price, Cost, (Un)Realized P&L of a position based on executed trades

We have built an algorithmic trading software and need to calculate the following parameters for each position in our portfolio. Average Price Cost Realized Profit & Loss Unrealized Profit & ...
89 views

### Do you have a validation set for Libor Market Model implementation?

I'm trying to calibrate a Libor Market Model (LMM) in Matlab with my user-defined function, not their package. I already fitted the market volatilities using SABR but failed to simulate the ...
112 views

### Pricing of Binary or Digital Options or more generally options with discontinuous payoffs using PDEs

I am trying to find references (books, papers, etc.) for calculating $\mathbb E f(X_T)$, where $X_T$ is a diffusion and $f$ is a real function that is not continuous, by means of solving a PDE or ...
409 views

### Do you know any data source for historical VWAP data?

I am looking for historical VWAP pricing data for north american equities. I haven't been able to find a free/cheap data source. Do you guys know of one ? Also, is there a way to proxy for an equities ...
311 views

### How do you estimate the capacity of a strategy from historical data?

What are some good ways to estimate the capacity of a strategy from historical data (including full market depth)? Obviously, a naive approach is that you want the strategy's returns to exceed its ...
134 views

### What is a canonical book or article to learn pair trading?

Can someone suggest a resource with a clean cut explanation of pair trading?
672 views

### Applicability of PCA to get historical volatilities to calibrate interest rates trees

My question in short is as follows: can I take main principal component of historical covariance matrix and use it as historical volatilities when fitting a binomial tree? Here's more detailed ...
104 views

### Dou you have an example of implementing Engle-Granger 2-step cointegration?

Does anyone know where to find an example of implementing Engle-Granger 2-step cointegration? Python's ideal, but any language will do. I've skimmed and read many articles, but understand little ...
917 views

### Tools/R code for predicting Dragon-Kings

The theory of the so called Dragon-Kings, esp. by Didier Sornette (ETH Zürich), basically states that financial crises and crashes are predictable (contrary to the theory of black swans). The ...
18 views

### Historical Daily NAV for Closed End Funds

Does anyone know where to get historical, daily net asset values for closed end funds from the date of inception to the present? Yahoo finance has daily opening, high, low, closing values, but no NAV ...
110 views

### Market data for options

Looking for recommendations on places to get market data for options. I'm looking at NYSE and NASDAQ only. My current solution is my broker, Tradeking. I can request realtime data for 700 option ...
37 views

### MLE estimate of normal distribution

Probably a naive question. I am quoting this from Greene's econometrics book: "The occasional statement that the properties of the MLE are only optimal in large samples is not true, however. It can ...
10 views

### Consumer (Borrowers and Lenders) risk free curve

I was thinking about this topic: how to construct a "risk free" curve for the generic consumer. Imagine we want to price a debt security done by a private, lended by another private (say, normal ...
21 views

### Finding relative price strength as defined in CANSLIM stock picking methodology

I am wondering if there is any website that provides relative price strength as is defined in CAN SLIM stock picking methodology. For the CAN SLIM difinition I am looking at this article: ...
16 views

### SRRI calculation for absolute return funds

I am trying to understand the formula for calculating SRRI for absolute return funds described in ESMA's guideline CESR/10-673, and Richard's answer has been of great help (What does this formula (to ...
75 views

### How to estimate parameters of geometric brownian motion with time-varying mean?

Does anyone know how to estimate $A$, $\sigma_1$,$\sigma_2$ from the following system? $$dx = \mu_t x dt + \sigma_1 x dB_x$$ $$d\mu = A(\bar\mu - \mu) dt + \sigma_2 dB_\mu$$ Variation in $x$ could ...
71 views

### What is the difference between these two Expected Shortfall definitions?

I have come across different ways expected shortfall is defined. e.g. $$ES_a(X)=\frac{1}{1-a}\int_a^1VaR_b(X)db$$ and $$ES_a(X)=\frac{1}{a}\int_0^aVaR_b(X)db$$ e.g. on Wikipedia's article. Are these ...
191 views

### Which is the better risk sensitive measure?

Consider the two following optimization problem 1) $$\min_{\theta} \ln E_{\theta}[ e^{X}]$$ 2) $$\min_{\theta} E_{\theta}[ X]$$ with the constraint $$Var_{\theta}[X] <c$$ Is it true that ...
39 views

### How to calculate cash flow for XC swap

Given 3MLibor vs 12MLibor USD basis swap the 3M Libor is exchanged at 12MLibor+1%. How to calculate the cash flow
42 views

### Conversion stock symbols Google Finance vs. Reuters

I'm working on a project that will fetch data from Google Finance and Reuters. In order to avoid keeping two separate lists of stock symbols, I'm looking for some kind of conversion or database or API ...
76 views

### Forex P&l Attribution on Physical Forward position

Please validate my unrealized Fx P&L calculation on the commodity forward contract e.g. consider i have bought 1 MT of wheat at 300 EURO my financial currency for company is USD. I am using below ...
2k views

### What is an efficient data structure to model order book?

What is an efficient data structure to model order book of prices and quantities to ensure: constant look up iteration in order of prices retrieving best bid and ask in constant time fast quantity ...
68 views

### What are pros and cons of mean absolute deviation portfolio optimization?

In this question a paper about mean absolute deviation portfolio optimization is mentioned and in the answer a spreadsheet with an implementation is attached. What is the use of this procedure? Does ...
55 views

### How to implement Konno's Mean-Absolute Deviation Portfolio Optimization Model using LP methods in Excel

Konno proposed a LP method for portfolio optimization using the Mean Absolute Deviation (MAD)
135 views

### Black-Scholes formula with deterministic discrete dividend (Musiela approach)

For deterministic discrete dividend, there are two approach Musiela approach, works when every dividend are paid at maturity of the option. Hull approach, works when every dividend are paid ...
123 views

### Executions deep in the Limit Order Book?

I have some Level III (message level) data for equities and I have found several cases in which I register the execution of a Limit Order at a price "worse" than the best bid or ask. For example, ...
149 views

220 views

### Daily option data

I am wondering where I can pull daily (hourly, by-the-minute, etc. even better) option data for a particular underlying. I would prefer a database I could scrape through and API, but would not mind ...
29 views

### Exponential weighting of returns

I am looking for a procedure to compute an exponential weighting of returns given a half life parameter. I ran accross a wikipedia article, can I take it unchanged an assume N(t) is the return at ...
182 views

### Is it statistically valid to ignore “irrelevant” stock prices during backtesting?

As an amateur trader, I have reasonable success with my current end-of-day trading systems. All my systems are based on at least ONE year of "in-sample" data for backtesting, followed by 6-months of ...
72 views

### How can I create a public viewable stock market index?

I have 3,000 tickers that I would like to turn into a weighted index, viewable by the general public by going to Yahoo and typing in ^PSNDX (for example) or go to E-Trade and enter something similar. ...
7k views

### How do I calculate the delta of a convertible bond?

How can I find the delta of a convertible bond to be used for hedging?
52 views

### What are recent important papers on credit portfolio risk modeling?

I'm interested in papers which consider mathematical models of risks of different portfolios of retail credit. This is not my area of research, so I may be misusing some terms. The idea is simple: I ...
104 views

### To lump or not to lump

Suppose I have a very simple asset whose price takes only three possible values: $X_t\in \{-1,0,1\}$. I also got some discrete time series $X = (X_t)_{t\geq 0}$ and I would like to come up with a ...
2k views

### Difference between google finance and yahoo finance?

I am wondering about the huge differences of the data provider google finance and yahoo finance. I am interested in the monthly data from adidas listed on xetra. In google: ETR:ADS and in yahoo ...
281 views

### Which method is implemented by Excel's YEARFRAC for ACT/ACT?

I know the algorithm used by Excel to calculate the YEARFRAC(startDate, endDate, basis) for basis=1. Excel calls the method "act/act". A Java re-implentation of Excel's algorithm can be found at ...
98 views

### Has automated trading produced profits at IEX?

Is there evidence that automated trading is profitable on the latency-enforced portion of the exchange? On the one hand, if automated trading was profitable when these limits existed naturally, it ...
19 views

### What is reliable data source for long term and short term capital gain distribution for funds?

The only source where I can find how the capital gains given out by funds is separated into long term and short term distribution is http://quotes.morningstar.com/fund/aqrix/f?t=AQRIX. It seems weird ...
77 views

### The role of Gamma in replicating a put

I am analyzing portfolio protection by replication of a put. Having my portfolio with value $V$ I could buy put giving me the payoff $P$ resulting in a call like pay-off scenario $C=V+P$. Say, I ...
264 views

### Are there providers of delayed market depth data (DOM, Level II, Order-by-Order, etc)?

I have market depth data visualization software, and I want to create a free version for introduction. As far as I know, exchanges allow to distribute their data for free for the end-users, but only ...
I have a question concerning the idea of consumption in multi period. The following is given $$C_1=W_0-xS_1+B$$ $$C_2=xS_2-BR$$ where $W_0$ is initial wealth $x$ is the weight on an asset with ...