Personal tools
User menu


From Thalesians

Revision as of 23:22, 7 February 2010 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Data and Information

You will need recent quotes, market summaries, news and analyses. The following sources of financial data and information are free:

  • Google Finance. Still a BETA, but works pretty well. Relatively recent. Nice interactive graphs.

You may use Reuters or Bloomberg terminals at work. They are expensive. However, their websites are free:



  • Sources and Methods of the OECD Economic Outlook. The OECD Economic Outlook provides a twice yearly assessment of economic trends, prospects and policies in OECD countries. The Sources and Methods is a regularly updated document to reflect the data sources and methodologies employed.


Current Numbers

In More Detail

  • OECD Economic Outlook published twice a year by OECD analyses the major trends and examines the economic policies of the OECD member countries. Includes a lot of statistical data.

Academic Papers

  • Johannes Wiegand. Bank Recycling of Petro Dollars to Emerging Market Economies During the Current Oil Price Boom. International Monetary Fund, Research Department, July 2008.
    • Abstract
    High oil prices have once again led to large external surpluses of oil exporting countries, similar to the 1970s and 1980s. This paper analyzes the extent to which (i) oil exporters use bank deposits to invest these surpluses, and (ii) banks are lending on these funds to emerging market economies. Bank recycling of petro dollars to emerging market economies is found to be almost as important as in the 1970s and 1980s, even though during the current boom, petro dollar bank flows tend to originate in countries like Russia, Libya, or Nigeria rather than in the Middle East. As one consequence, a fall in oil prices could yet again disrupt financing flows to emerging economies. Especially at risk could be countries that rely heavily on bank loans to finance external deficits, many of them in Emerging Europe.
  • Frederic S. Mishkin. Will Monetary Policy Become More of a Sceince? Finance and Economics Discussion Series (FEDS) paper 2007-44. The Federal Reserve Board, 2007.
    • Abstract
    This paper reviews the progress that the science of monetary policy has made over recent decades. This progress has significantly expanded the degree to which the practice of monetary policy reflects the application of a core set of "scientific" principles. However, there remains, and will likely always remain, elements of art in the conduct of monetary policy.



Academic Papers

  • Gilles O. Zumbach, Ulrich A. Müller. Operators on Inhomogeneous Time Series. Olsen & Associates' Working Paper No. 324. February 1, 2000.
    • Abstract
    We present a toolbox to compute and extract information from inhomogeneous (i.e. unequally spaced) time series. The toolbox contains a large set of operators, mapping from the space of inhomogeneous time series to itself. These operators are computationally efficient (time and memory-wise) and suitable for stochastic processes. This makes them attractive for processing high-frequency data in finance and other fields. Using a basic set of operators, we easily construct more powerful combined operators which cover a wide set of typical applications. The operators are classified in macroscopic operators (that have a limit value when the sampling frequency goes to infinity) and microscopic operators (that strongly depend on the actual sampling). For inhomogeneous data, macroscopic operators are more robust and more important. Examples of macroscopic operators are (exponential) moving averages, differentials, derivatives, moving volatilities, etc.

Foreign Exchange


Current and Historical Research

  • DailyFX — breaking forex news, real time market analysis, trading strategies plus a global economic calendar.
  • — an information site on the foreign exchange market. It features forex analysis (especially current technicals), latest news, an economic calendar, and trading tools.

Surveys and Reports

  • The 78th Annual Report of the Bank for International Settlements for the financial year which began on 1 April 2007 and ended on 31 March 2008 was submitted to the Bank's Annual General Meeting held in Basel on 30 June 2008. Part V focusses on the foreign exchange markets.
    • Abstract of Part V
    Foreign exchange market volatility picked up sharply in the latter half of 2007 and has remained at elevated levels since. This was associated with a faster rate of decline of the US dollar as well as a substantial appreciation of the euro, yen and Swiss franc. As carry trades became less attractive, expected growth differentials became more of a focal point for market sentiment than prevailing levels of interest rates. While exchange rate policies continued to shape the behaviour of some emerging market currencies, developments in commodity prices and specific trends in capital flows also exerted a considerable influence on exchange rates. Notwithstanding some significant exchange rate movements and tensions in certain foreign exchange swap and cross-currency swap markets, foreign exchange spot markets generally continued to function smoothly throughout the period of higher volatility. From a longer-term perspective, there have been a number of notable developments that could potentially have a bearing on the resilience of foreign exchange markets. These include higher turnover, greater diversity in foreign exchange market activity and improvements in the risk management infrastructure. While generally positive, it is possible that the full implications of these developments for market dynamics at times of stress have not yet become apparent. It is important, therefore, to sustain the impetus for better risk management practices in foreign exchange markets going forward.

Derivatives, Volatility and Correlation



Lecture Notes

Press Articles

Academic Papers

For copyright reasons, I have restricted access to some of these papers. Sorry.

  • Kenneth J. Arrow, Gerard Debreu. Existence of an Equilibrium for a Competitive Economy. Econometrica, Vol. 22, No. 3 (Jul., 1954), pp. 265-290.
    • Abstract
    A. Wald has presented a model of production and a model of exchange and proofs of the existence of an equilibrium for each of them. Here proofs of the existence of an equilibrium are given for an integrated model of production, exchange and consumption. In addition the assumption made on the technologies of producers and the tastes of consumers are significantly weaker than Wald's. Finally a simplification of the structure of the proofs has been made possible through use of the concept of an abstract economy, a generalization of that of a game.
    • Note
    In this paper Arrow and Debreu also introduce the notion of a state price.
  • Eugene F. Fama. Efficient Capital Markets: A Review of Theory and Empirical Work. The Journal of Finance, Vol. 25, No. 2, Papers and Proceedings of the Twenty-Eighth Annual Meeting of the American Finance Association New York, N.Y. December, 28-30, 1969. (May, 1970), pp. 383-417.
    • Note
    Fama's paper on the theory of efficient markets.
  • Fisher Sheffey Black, Myron Scholes. The Pricing of Options and Corporate Liabilities. Journal of Political Economy, 81 (May/June 1973): 637-59.
    • Abstract
    If options are correctly priced in the market, it should not be possible to make sure profits by creating portfolios of long and short positions in options and their underlying stocks. Using this principle, a theoretical valuation formula for options is derived. Since almost all corporate liabilities can be viewed as combinations of options, the formula and the analysis that led to it are also applicable to corporate liabilities such as common stock, corporate bonds, and warrants. In particular, the formula can be used to derive the discount that should be applied to a corporate bond because of the possibility of default.
    • Note
    This is the celebrated Black-Scholes paper on option pricing.
  • Robert C. Merton. Theory of Rational Option Pricing. The Bell Journal of Economics and Management Science, Vol. 4, No. 1. (Spring, 1973), pp. 141-183.
    • Abstract
    The long history of the theory of option pricing began in 1900 when the French mathematician Louis Bachelier deduced an option pricing formula based on the assumption that stock prices follow a Brownian motion with zero drift. Since that time, numerous researchers have contributed to the theory. The present paper begins by deducing a set of restrictions on option pricing formulas from the assumption that investors prefer more to less. These restrictions are necessary conditions for a formula to be consistent with a rational pricing theory. Attention is given to the problems created when dividends are paid on the underlying common stock and when the terms of the option contract can be changed explicitly by a change in exercise price or implicitly by a shift in the investment or capital structure policy of the jrm. Since the deduced restrictions are not sufficient to uniquely determine an option pricing formula, additional assumptions are introduced to examine and extend the seminal Black-Scholes theory of option pricing. Explicit formulas for pricing both call and put options as well as for warrants and the new "down-and-out" option are derived. The effects of dividends and call provisions on the warrant price are examined. The possibilities for further extension of the theory to the pricing of corporate liabilities are discussed.
    • Note
    In this paper Merton examines and extends the work by Black and Scholes.
  • Robert C. Merton. Option Pricing when Underlying Stock Returns Are Discontinuous. Journal of Financial Economics 3 (January-February 1976), pp. 125–144.
    • Abstract
    The validity of the classic Black-Scholes option pricing formula depends on the capability of investors to follow a dynamic portfolio strategy in the stock that replicates the payoff structure to the option. The critical assumption required for such a strategy to be feasible, is that the underlying stock return dynamics can be described by a stochastic process with a continuous sample path. In this paper, an option pricing formula is derived for the more general case when the underlying stock returns are generated by a mixture of both continuous and jump processes. The derived formula has most of the attractive features of the original Black-Scholes formula in that it does not depend on investor preferences or knowledge of the expected return on the underlying stock. Moreover, the same analysis applied to the options can be extended to the pricing of corporate liabilities.
    • Note
    This paper introduces a jump-diffusion model. In this model asset prices can undergo random jumps of a substantial fraction of their value.
  • Oldrich Vasicek. An Equilibrium Characterization of the Term Structure. Journal of Financial Economics 5 (1977) pp. 177-188.
    • Abstract
    The paper derives a general form of the term structure of interest rates. The following assumptions are made: (A.1) The instantaneous (spot) interest rate follows a diffusion process; (A.2) the price of a discount bond depends only on the spot rate over its term; and (A.3) the market is efficient. Under these assumptions, it is shown by means of an arbitrage argument that the expected rate of return on any bond in excess of the spot rate is proportional to its standard deviation. This property is then used to derive a partial differential equation for bond prices. The solution to that equation is given in the form of a stochastic integral representation. An interpretation of the bond pricing formula is provided. The model is illustrated on a specific case.
  • John C. Cox, Stephen A. Ross, Mark Rubinstein. Option Pricing: A Simplified Approach. Journal of Financial Economics, 1979. A link to this paper on
    • Abstract
    This paper presents a simple discrete-time model for valuing options. The fundamental economic principles of option pricing by arbitrage methods are particularly clear in this setting. Its development requires only elementary mathematics, yet it contains as a special limiting case the celebrated Black-Scholes model, which has previously been derived only by much more difficult methods. The basic model readily lends itself to generalisation in many ways. Moreover, by its very construction, it gives rise to a simple and efficient numerical procedure for valuing options for which premature exercise may be optimal.
    • Note
    This paper introduces the idea of pricing on a binary tree.
  • John C. Cox, Jonathan E. Ingersoll, Jr., Stephen A. Ross. A Theory of the Term Structure of Interest Rates. Econometrica, Vol. 53, No. 2 (March, 1985).
    • Abstract
    This paper uses an intertemporal general equilibrium asset pricing model to study the term structure of interest rates. In this model, anticipations, risk aversion, investment alternatives, and preferences about the timing of consumption all play a role in determining bond prices. Many of the factors traditionally mentioned as influencing the term structure are thus included in a way which is fully consistent with maximizing behavior and rational expectations. The model leads to specific formulas for bond prices which are well suited for empirical testing.
  • David Heath, Robert Jarrow, Andrew Morton. Bond Pricing and the Term Structure of Interest Rates: A New Methodology for Contingent Claims Valuation. Econometrica, Vol. 60, No. 1 (January, 1992), pp. 77–105.
    • Abstract
    This paper presents a unifying theory for valuing contingent claims under a stochastic term structure of interest rates. The methodology, based on the equivalent martingale measure technique, takes as given an initial forward rate curve and a family of potential stochastic processes for its subsequent movements. A no arbitrage condition restricts this family of processes yielding valuation formulae for interest rate sensitive contingent claims which do not explicitly depend on the market prices of risk. Examples are provided to illustrate the key results.
  • Steven L. Heston. A Closed-Form Solution for Options with Stochastic Volatility with Applications to Bond and Currency Options. The Review of Financial Studies, Vol. 6, No. 2, (1993), pp. 327-343.
    • Abstract
    I use a new technique to derive a closed-form solution for the price of a European call option on an asset with stochastic volatility. The model allows arbitrary correlation between volatility and spot-asset returns. I introduce stochastic interest rates and show how to apply the model to bond options and foreign currency options. Simulations show that correlation between volatility and the spot asset's price is important for explaining return skewness and strike-price biases in the Black-Scholes (1973) model. The solution technique is based on characteristic functions and can be applied to other problems.
    • Note
    This paper introduces the Heston model, the best-known and most popular of all stochastic volatility models.
  • Michael J. Stutzer. A Simple Nonparametric Approach to Derivative Security Valuation. Journal of Finance, Volume 51, Issue 5 (Dec., 1996), 1633-1652.
    • Abstract
    Canonical valuation uses historical time series to predict the probability distribution of the discounted value of primary assets' discounted prices plus accumulated dividends at any future date. Then the axiomatically-rationalized maximum entropy principle is used to estimate risk-neutral (equivalent martingale) probabilities that correctly price the primary assets, as well as any predesignated subset of derivative securities whose payoffs occur at this date. Valuation of other derivative securities proceeds by calculation of its discounted, risk-neutral expected value. Both simulation and empirical evidence suggest that canonical valuation has merit.
  • Emanuel Derman. Strike-Adjusted Spread: A New Metric for Estimating the Value of Equity Options. Goldman Sachs, July 1999.
    • Abstract
    Investors in equity options experience two problems that compound each other. In contrast to fixed-income and currency markets, there are thousands of underlyers and tens of thousands of options, and each underlyer can have a potentially large volatility skew. How can an options investor gauge which option provides the best relative value? In this paper, we make use of a method for estimating the fair volatility smile of any equity underlyer from information embedded in the time series of that underlyer’s historical returns. We can then compute the relative richness or cheapness of any particular strike and expiration by examining the option’s Strike-Adjusted Spread, or SAS, the difference between its market implied volatility and its estimated historically-fair volatility. We obtain fair volatility smiles by estimating the appropriate risk-neutral distribution for valuing options on any equity underlyer from that underlyer’s historical returns. The distribution includes the effect of both past price jumps and past shifts in realized volatility. Using this distribution, we can estimate the fair volatility skews for illiquid or thinly-traded single-stock and basket options. We can also forecast changes in the skew from changes in a single options price.
  • Patrick S. Hagan, Deep Kumar, Andrew S. Lesniewski, Diana E. Woodward. Managing Smile Risk. WILMOTT Magazine, September 2002, pp. 84-108.
    • Abstract
    Market smiles and skews are usually managed by using local volatility models a la Dupire. We discover that the dynamics of the market smile predicted by local vol models is opposite of observed market behavior: when the price of the underlying decreases, local vol models predict that the smile shifts to higher prices; when the price increases, these models predict that the smile shifts to lower prices. Due to this contradiction between model and market, delta and vega hedges derived from the model can be unstable and may perform worse than naive Black-Scholes' hedges.
    To eliminate this problem, we derive the SABR model, a stochastic volatility model in which the forward value satisfies
     d \hat{F} = \hat{a} \hat{F}^\beta d W_1
     d \hat{a} = \nu \hat{a} d W_2
    and the forward  \hat{F} and volatility  \hat{a} are correlated: dW1dW2 = ρdt. We use singular perturbation techniques to obtain the prices of European options under the SABR model, and from these prices we obtain explicit, closed-form algebraic formulas for the implied volatility as functions of today's forward price  f = \hat{F}(0) and the strike K. These formulas immediately yield the market price, the market risks, including vanna and volga risks, and show that the SABR model captures the correct dynamics of the smile. We apply the SABR model to USD interest rate options, and find good agreement between the theoretical and observed smiles.
    • Note
    This paper introduces the famous SABR model. Volatility does not mean revert in the SABR model, so it is only good for short expirations. Nevertheless the model has the virtue of having an exact expression for the implied volatility smile in the short expiration limit  \tau \rightarrow 0 .
  • Emanuel Derman. The Illusions of Dynamic Replication. Quantitative Finance, Vol. 5, No. 4, August 2005, 323–326.
    • Abstract
    How well does options pricing theory really work, and how dependent is it on the notion of dynamic replication? In this note we describe what many practitioners know from long and practical experience: (i) dynamic replication doesn't work as well as students are taught to believe; (ii) most derivatives traders rely on it as little as possible; and (iii) there is a much simpler way to derive many option pricing formulas: many of the results of dynamic option replication can be obtained more simply, by regarding (as many practitioners do) an options valuation model as an interpolating formula for a hybrid security that correctly matches the boundary values of the ingredient securities that constitute the hybrid.
  • Bruno Dupire. Fair Skew: Break-Even Volatility Surface. Bloomberg L.P., September 2006.
    • Abstract
    We show how to analyze a price time series to obtain instead of a single historical volatility a whole surface of estimates, to be applied to options of various strikes and maturities. It provides answers to questions such as: (1) Where should risk reversal and butterflies on major currency pairs trade? (2) How to efficiently implement an implied/historical volatility arbitrage? (3) Are the strong index equity skews justified? (4) What should be the pattern of implied volatilities for options on illiquid currency pairs? (5) Same question for swaptions, options on commodities spreads, on baskets... We investigate several methods that attempt to answer these questions by merely exploiting the structure of the price time series and propose an approach based on the back testing of delta hedge strategies.
  • Emanuel Derman. Regimes of Volatility: Some Observations on the Variation of S&P 500 Implied Volatilities. Goldman Sachs, January 1999.
    • Abstract
    Since the 1987 stock market crash, the S&P 500 index options market has displayed a persistent implied volatility skew. How should the skew vary as markets move? There are a variety of apocryphal rules and theoretical models, each leading to different predictions. In this report I examine more than a year’s worth of S&P 500 implied volatilities, qualitatively isolating several distinct periods in which different patterns of change seem to hold. For each period, I try to determine which rule or model the volatility market seems to be following, the possible reason why, and whether the change in volatility is appropriate.
  • Nicolas Mougeot. Volatility Investing Handbook. BNP Paribas, September 2005.
    • Abstract
    The goal of this paper is to introduce investors to sophisticated derivative instruments that allow them to take views on volatility. Despite the fact that volatility-sensitive derivatives have been traded for years if not centuries, it is only recently that products giving pure exposure to volatility have appeared. The paper covers volatility swaps, variance swaps, third-generation volatility products and correlation trading.
  • Emanuel Derman. More Than You Ever Wanted To Know About Volatility Swaps. Goldman Sachs, March 1999.
    • Abstract
    Volatility swaps are forward contracts on future realised stock volatility. Variance swaps are similar contracts on variance, the square of future volatility. Both of these instruments provide an easy way for investors to gain exposure to the future level of volatility. Unlike a stock option, whose volatility exposure is contaminated by its stock-price dependence, these swaps provide pure exposure to volatility alone. You can use these instruments to speculate on future volatility levels, to trade the spread between realised and implied volatility, or to hedge the volatility exposure of other positions or businesses. In this report we explain the properties and the theory of both variance and volatility swaps, first from an intuitive point and then more rigorously. The theory of variance swaps is more straightforward. We show how a variance swap can be theoretically replicated by a hedged portfolio of standard options with suitably chosen strikes, as long as stock prices evolve without jumps. The fair value of the variance swap is the cost of the replicating portfolio. We derive analytic formulae for theoretical fair value in the presence of realistic volatility skews. These formulae can be used to estimate swap values quickly as the skew changes. We then examine the modifications to these theoretical results when reality intrudes, for example when some necessary strikes are unavailable, or when stock prices undergo jumps. Finally we briefly return to volatility swaps, and show that they can be replicated by dynamically trading the more straightforward variance swap. As a result, the value of the volatility swap depends on the volatility of volatility itself.
  • Emanuel Derman. A Guide to Volatility and Variance Swaps. The Journal of Derivatives. Summer 1999.
    • Abstract
    Volatility swaps are forward contracts on future realised stock volatility. Variance swaps are similar contracts on variance, the square of future volatility. Both these instruments provide an easy way for investors to gain exposure to the future level of volatility. Ulike a stock option, whose volatility exposure is contaminated by its stock price dependence, these swaps provide pure exposure to volatility alone. You can use these instruments to speculate on future volatility levels, to trade the spread between realised and implied volatility, or to hedge the volatility exposure of other positions or businesses. In this report we explain the properties and the theory of both variance and volatility swaps, first from an intuitive point of view and then more rigorously. The theory of variance swaps is the more straightforward. We show how a variance swap can be theoretically replicated by a hedged portfolio of standard options with suitably chosen strikes, as long as stock prices evolve without jumps. The fair value of the variance swap is the cost of the replicating portfolio. We derive an analytic formula for theoretical fair value in the presence of realistic volatility skews. This formula can be used to estimate swap values quickly as the skew changes. We then examine modifications to these theoretical results when reality intrudes, such as when some necessary strikes are unavailable, or when stock prices undergo jumps. Finally, we point out that volatility swaps can be replicated by dynamically trading the more straightforward variance swap. As a result, the value of the volatility swap depends on the volatility of volatility itself.
  • Rama Cont, José da Fonseca, Valdo Durrleman. Stochastic Models of Implied Volatility Surfaces. Economic Notes by Banca Monte dei Paschi di Siena SpA. Vol. 31, no. 2-2002, pp. 361-377.
    • Abstract
    We propose a market-based approach to the modelling of implied volatility, in which the implied volatility surface is directly used as the state variable to describe the joint evolution of market prices of options and their underlying asset. We model the evolution of an implied volatility surface by representing it as a randomly fluctuating surface driven by a finite number of orthogonal random factors. Our approach is based on a Karhunen-Loève decomposition of the daily variations of implied volatilities obtained from market data on S&P500 and DAX options. We illustrate how this approach extends and improves the accuracy of the well-known "sticky moneyness" rule used by option traders for updating implied volatilities. Our approach gives a justification for the use of "Vegas" for measuring volatility risk and provides a decomposition of volatility risk as a sum of independent contributions from empirically identifiable factors.
  • Valdo Durrleman, Nicole El Karoui. Coupling Smiles. March 20, 2007. Available at SSRN:
    • Abstract
    The present paper addresses the problem of computing implied volatilities of options written on a domestic asset based on implied volatilities of options on the same asset expressed in a foreign currency and the exchange rate. It proposes an original method together with explicit formulas to compute the at-the-money implied volatility, the smile's skew, convexity, and term structure for short maturities. The method is completely free of any model specification or Markov assumption; it only assumes that jumps are not present. We also investigate how the method performs on the particular example of the currency triplet dollar, euro, yen. We find a very satisfactory agreement between our formulas and the market at one week and one month maturities.
  • Uwe Schmock, Steven E. Shreve, Uwe Wystup. Dealing with Dangerous Digitals. October 25, 2001. Foreign Exchange Risk. Risk Publications, London.
    • Abstract
    Options with discontinuous payoffs are generally traded above their theoretical Black-Scholes prices because of the hedging difficulties created by their large delta and gamma values. A theoretical method for pricing these options is to contstrain the hedging portfolio and incorporate this constraint into the pricing by computing the smallest initial capital which permits super-replication of the option. We develop this idea for exotic options, in which case the pricing problem becomes one of stochastic control. The high cost of exact super-replication coincides with market price quotations for dangerous derivatives such as reverse knock-out barrier options, which are often higher than their risk-neutral expected payoff (theoretical value). This paper illustrates how the theory of leverage constrained pricing can be successfully applied to compute close-to-market option values and serves as a practitioner's guide to derive explicit formulae and compute prices by finite difference methods.
  • Peter G. Harrison. Sloppy Derivations of Ito's Formula and the Fokker-Planck Equations. Unpublished.
    • Abstract
    These steps get you Ito's formula and the Fokker-Planck forward and backward partial differential equations from the stochastic differential equation dXt = μ(Xt,t)dt + σ(Xt,t)dWt, where Wt is a Wiener process, using simple, intuitive steps. The derivations are not to be considered as rigorous but hopefully they give the gist.
  • Yong Ren, Dilip Madan, Michael Qian Qian. Calibrating and Pricing with Embedded Local Volatility Models. Risk Magazine, 1 September, 2007.
    • Abstract
    Consistently fitting vanilla option surfaces when pricing volatility derivatives such as Vix options or interest rate/equity hybrids is an important issue. Here, Yong Ren, Dilip Madan and Michael Qian Qian show how this can be accomplished, using a stochastic local volatility model as the main example. They also give, for the first time, quanto corrections in local volatility models.



  • VIDEO LECTURES: Multivariable Calculus (18.02), Prof. Denis Auroux, Dept. of Mathematics, Massachusetts Institute of Technology.
    • Abstract
    This course covers vector and multi-variable calculus. It is the second semester in the freshman calculus sequence. Topics include vectors and matrices, partial derivatives, double and triple integrals, and vector calculus in 2 and 3-space.

Stochastic Calculus

  • Lawrence C. Evans. An Introduction to Stochastic Differential Equations. Version 1.2. Lecture notes for postgraduates at the Department of Mathematics, UC Berkeley.
    • Abstract
    These notes survey, without too many precise details, the basic theory of probability, random differential equations and some applications.
    Stochastic differential equations are usually, and justly, regarded as a graduate level subject. A really careful treatment assumes the students' familiarity with probability theory, measure theory, ordinary differential equations, and partial differential equations as well.
    But as an experiment I tried to design these lectures so that starting graduate students (and maybe really strong undergraduates) can follow most of the theory, at the cost of some omission of detail and precision. I for instance downplayed most measure theoretic issues, but did emphasize the intuitive idea of σ-algebras as "containing information". Similarly, I "prove" many formulas by confirming them in easy cases (for simple random variables or for step functions), and then just stating that by extension these rules hold in general. I also did not reproduce in class some of the more complicated proofs provided in these notes, although I did try to explain the guiding ideas.

Numerical Analysis

  • Angus MacKinnon. Computational Physics. Lecture notes for the 3rd/4th year option for physics undergraduates at Imperial College London.
    • Abstract
    The use of computers in physics, as well as most other branches of science and engineering, has increased many times along with the rapid development of faster and cheaper hardware. This course aims to give the student a thorough grounding in the main computational techniques used in modern physics. It is particularly important in this course that the students should learn by doing. The course is therefore designed such that a significant fraction of the students' time is spent actually programming specific physical problems rather than learning abstract techniques. The course will cover problems in 5 broad sections: (1) ordinary differential equations, such as those of classical mechanics; (2) partial differential equations, such as Maxwell's equations and the Diffusion and Schrödinger equations; (3) matrix methods, such as systems of equations and eigenvalue problems applied to Poisson's equation and electronic structure calculations; (4) Monte Carlo and other simulation methods, such as the Metropolis algorithm and molecular dynamics; (5) computer algebra; an introduction using Maple to the uses and abuses of algebraic computing in physics.

Linear Programming and Optimisation

Stochastic Calculus and Stochastic Differential Equations


  • Statistics Online Computational Resource (SOCR) is a suite of online tools and interactive aids for hands-on learning and teaching concepts in statistical analyses and probability theory. This free Java-based resource offers interactive distribution applets, statistical analysis modules, data modeler, graphics tools and more.

Time Series Analysis


  • LaTeX — a document preparation system. LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. LaTeX is the de facto standard for the communication and publication of scientific documents.



  • Google Code Search — helps you find function definitions and sample code by giving you one place to search publicly accessible source code hosted on the Internet. Extremely useful. Supports regular expressions.
  • Koders — Source Code Search Engine — an alternative to Google Code Search. Koders were around before Google Code Search, but my subjective perception is that GCS provides a better quality service. In each case I use both.
  • Refactoring Home Page with information about refactoring and links to useful tools, by Martin Fowler.

Software Engineering

Academic Papers

Many of the following ideas are learned unattributed. They have become common wisdom in software engineering. Yet it is instructive to read the original, highly insightful papers where these ideas are introduced for the first time. They weren't always obvious.

As the title suggests, Dijkstra is arguing against the GO TO statement and spaghetti code.

Here Dijkstra introduces the principle of separation of concerns, although the paper considers the examples of the computer science and departmental politics rather than software engineering.

  • David Lorge Parnas. On the Criteria To Be Used in Decomposing Systems into Modules. Communications of the ACM, Vol. 15, No. 12, December 1972, pp. 1053-1058.
    • Abstract
    This paper discusses modularisation as a mechanism for improving the flexibility and comprehensibility of a system while allowing the shortening of its development time. The effectiveness of a "modularisation" is dependent upon the criteria used in dividing the system into modules. A system design problem is presented and both a conventional and unconventional decomposition are described. It is shown that the unconventional decompositions have distinct advantages for the goals outlined. The criteria used in arriving at the decomposition, if implemented with the conventional assumption that a module consists of one or more subroutines, will be less efficient in most cases. An alternative approach to implementation which does not have this effect is sketched.

In brief, this paper introduces and, to an extent, formalises modularisation.



Home Page


  • C/C++ Reference covers General C/C++, Standard C Library, C++, C++ Standard Template Library. This site is meant to be used by more-or-less experienced C++ programmers, who have a good idea of what they want to do and simply need to look up the syntax.


See also the The C++ Standards Committee home page.


Design Patterns

  • Jun Nakamura. The Singleton Pattern Revisited (Developer Shed).
    • Abstract
    This article addresses a number of questions: How to construct a Singleton when the class has a non-trivial constructor with arguments that are calculated at run-time? How to use the Singleton in a multi-threaded environment? If you are wondering about these issues, read this tutorial.


Managed and Unmanaged Code in .NET


  • Quick and Dirty Series: C++ FileSize() Function by Christopher Diggins (CodeProject).
    • Abstract
    The C++ standard library doesn't have a FileSize() function and, in fact, there is no simple way to query the file size in a portable manner. The reason is that the size of a file is only really accessible through the operating system. This tutorial considers the options available to the programmer.
  • Why size_t Matters by Dan Saks (
    • Abstract
    Using size_t appropriately can improve the portability, efficiency, or readability of your code. Maybe even all three.

FAQ Lists

Usenet Newsgroups

Academic Papers



  • GotW #74: Uses and Abuses of Vector. Almost everybody uses std::vector, and that's good. Unfortunately, many people misunderstand some of its semantics and end up unwittingly using it in surprising and dangerous ways. A discussion by Herb Sutter.
  • Extending the C++ STL with Custom Containers (TechRepublic). The creators of C++ took immense care to create a library that was efficient, portable, and reusable. The STL can be summed up into iterators, algorithms, and containers. In this article, the author concentrates on analysing and extending the containers that STL provides.


  • shared_ptr. The shared_ptr class template stores a pointer to a dynamically allocated object, typically with a C++ new-expression. The object pointed to is guaranteed to be deleted when the last shared_ptr pointing to it is destroyed or reset. See example.
  • scoped_ptr. The scoped_ptr class template stores a pointer to a dynamically allocated object. The object pointed to is guaranteed to be deleted, either on destruction of the scoped_ptr, or via an explicit reset. The primary reason to use scoped_ptr rather than auto_ptr is to let readers of your code know that you intend "resource acquisition is initialisation" to be applied only for the current scope, and have no intent to transfer ownership. One common usage of scoped_ptr is to implement a handle/body (also called pimpl) idiom which avoids exposing the body (implementation) in the header file.
  • Tuple. A tuple (or n-tuple) is a fixed size collection of elements. Pairs, triples, quadruples, etc. are tuples. In a programming language, a tuple is a data object containing other objects as elements. These element objects may be of different types. The Boost Tuple Library implements a tuple construct using templates.
  • Ref. A small library that is useful for passing references to function templates (algorithms) that would usually take copies of their arguments.
  • Gregorian. The Gregorian date system provides a date programming system based on the Gregorian calendar. The class boost::gregorian::date is the primary temporal type for users. It is immutable and is stored as a 32 bit integer type. The class is specifically designed to NOT contain virtual functions. This design allows for efficient calculation and memory usage with large collections of dates.
  • Zip Iterator. The zip iterator provides the ability to parallel-iterate over several controlled sequences simultaneously.
  • BCCL. The Boost Concept Check Library (BCCL) provides a mechanism for inserting compile-time checks of template parameters; a framework for specifying concept requirements through concept checking classes; a mechanism for verifying that concept requirements cover the template; a suite of concept checking classes and archetype classes that match the concept requirements in the C++ Standard Library.


  • log4cxx is a C++ port of log4j. It attempts to mimic the log4j usage as much as the language will allow and to be compatible with log4j's configuration and output formats.
    • log4cxx for Win32 with VS2005 by merc. This blog entry explains how to build the latest snapshot of this project from SVN on a Win32 system with VS2005. Unfortunately, this exercise is non-trivial. merc has very kindly created the VS2005 build files for log4cxx and compiled the project. It is all available on the web. Isn't he a wonderful person?



  • XLW — C++ wrapper of Excel C API. The excel32 C++ wrapper package (a.k.a. XLW) is a free/open source C++ wrapper of the Excel C API. It makes Excel programming simpler, speeding up the development of Excel add-ins. Mark Joshi is among the users of this library.


Home Page


Code Conventions

We don't know if there is a formal, official code conventions document by Microsoft. If you do, please let us know!

  • Coding Standard: C# by Vic Hartog and Dennis Doomen of Philips Medical Systems. Unofficial, PDF.


This tutorial will not work if the built DLL is located on a network drive; it must be on a local drive such as C:. Otherwise you will see an error message on building the project:

Cannot register assembly "<path>\<name>.dll"
Exception has been thrown by the target of an invocation.

So go to Project > <project name> Properties..., select the Build tab, and set the Output path accordingly, e.g. C:\Build\Debug for Debug, C:\Build\Release for Release.


  • Solution Build Environment. This add-in uses a new file called SolutionName.slnenv residing in the same directory as the solution to provide build environment variables tailored to a given solution file. .slnenv stands for "solution environment". The Solution Build Environment add-in executes this file at solution open time and before the start of each build, resetting the build's environment variables accordingly.


Home Page



Code Conventions


Code Examples

  • Example Depot. A good collection of source code examples from The Java Developers Almanac and beyond. Very useful.


  • Jakarta Commons. A collection of open source reusable Java components from the Apache/Jakarta community.
    • Lang (API). Provides a host of helper utilities for java.lang API, notably String manipulation methods, basic numerical methods, object reflection, creation and serialization, and System properties. Additionally it contains an inheritable enum type, an exception structure that supports multiple types of nested Exceptions, basic enhancements to java.util.Date and a series of utilities dedicated to help with building methods, such as hashCode, toString and equals.
      • Highlights
      EqualsBuilder, HashCodeBuilder, CompareToBuilder, ToStringBuilder, ObjectUtils, NumberUtils, DateUtils, StringUtils, RandomUtils, StopWatch.
    • Collections (API). Contains implementations, enhancements and utilities that complement the Java Collections Framework.
      • Highlights
    • Logging (User Guide, API). An ultra-thin bridge between different logging implementations. A library that uses the commons-logging API can be used with any logging implementation at runtime. Commons-logging comes with support for a number of popular logging implementations, including log4j.
    • CLI (User Guide, API). The Apache Commons CLI (Command Line Interface) library provides an API for processing command line interfaces.
  • Apache Logging Services: log4j. The Apache Logging Services Project creates and maintains Open Source software related to the logging of application behaviour and released at no charge to the public. log4j is a de facto standard logging framework in Java.
  • Castor (API). An Open Source data binding framework for Jama. It's the shortest path between Java objects, XML documents and relational tables. Castor provides Java-to-XML binding, Java-to-SQL persistence, and more.




Home Page

Online Books

  • A Byte of Python, an online book on programming using the Python language. It serves as a tutorial or guide to the Python language for a beginner audience. This resource is praised by many including Bruce Eckel.
  • Dive Into Python by Mark Pilgrim, a book on Python for experienced programmers.
  • Thinking in Python by Bruce Eckel, another advanced book. This is still a work in progress, but you can download the current version.


  • Python Cookbook, is an O'Reilly book by David Ascher, Alex Martelli and Anna Ravenscroft. Some of the recipes were contributed by the community and are available online.
  • Python FAQTs, an online knowledge base containing recipes and code snippets.


  • Python Idioms — Every computer language has "idioms", that is, typical ways of accomplishing given tasks. Python is no exception. This material comes from the CS11 Computer Language Shop by Mike Vanier and Donnie Pinkston at CalTech.

David Mertz writes a column on Python topics for IBM developerWorks called Charming Python. An archive of his publications is available here. Here are some links to the tutorials I found most interesting:

wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWidgets cross-platform GUI library, which is written in C++.

  • The wxPython Tutorial by Jan Bodnar is the largest and most advanced wxPython tutorial available on the Internet. Suitable for beginners and intermediate programmers. I found the Skeletons chapter particularly useful.

Some other interesting tutorials:

Academic Papers


  • NumPy — the fundamental package needed for scientific computing. It includes a powerful N-dimensional array object, sophisticated (broadcasting) functions, basic linear algebra functions, Fourier transforms implementations, random number generators, and tools for integrating Fortran and C/C++ code.
  • SciPy — scientific tools for Python. An open-source library of scientific tools for Python. It depends on the NumPy library and gathers a variety of high level science and engineering modules together as a single package. SciPy provides modules for statistics, optimisation, numerical integration, linear algebra, Fourier transforms, signal processing, image processing, genetic algorithms, ODE solvers, special functions, and more.
  • matplotlib — a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. The plotting functions have a high degree of MATLAB compatibility.
  • RPy — a simple, yet robust, Python interface to the R Programming Language, ``R from Python. This package will be of particular interest to statisticians since R historically remains one of the packages of choice for probability, statistics, and data processing work.
  • MDP — a Modular toolkit for Data Processing. Implemented algorithms include: Principal Component Analysis (PCA), Independent Component Analysis (ICA), Slow Feature Analysis (SFA), Independent Slow Feature Analysis (ISFA), Growing Neural Gas (GNG), Factor Analysis, Fisher Discriminant Analysis (FDA), Gaussian Classifiers, and Restricted Boltzmann Machines.
  • SimPy — Simulation in Python, an object-oriented, process-based discrete event simulation language based on standard Python.
  • quantlib-python — Python bindings for QuantLib, a free/open-source library for quantitative finance.
  • TA-Lib — the technical analysis library also comes with Python bindings.
  • Sybase module for Python — provides a Python interface to the Sybase relational database system. The Sybase package supports all of the Python Database API, version 2.0, with extensions.
  • config — a module for configuring Python programs which aims to offer more power and flexibility than the existing ConfigParser module.
  • h5py &mdash Python bindings for the HDF5 library.

Open Source

  • Open Source Software in Python — a collection of open source software projects in Python covering a wide range of categories (Ajax frameworks, aspect-oriented frameworks, bloggers, build systems, content management systems, charting and reporting tools, code analysers, database connection pools and database engines, etc.).


Python docstrings are nowadays increasingly written in reStructuredText.



Home Page

Code Conventions

Academic Papers

  • Peter J. Acklam. MATLAB Array Manipulation Tips and Tricks. October, 2003.
    • This document is intended to be a compilation of tips and tricks mainly related to efficient ways of manipulating arrays in MATLAB. Here, "manipulating arrays" includes replicating and rotating arrays or parts of arrays, inserting, extracting, replacing, permuting and shifting arrays or parts of arrays, generating combinations and permutations of elements, run-length encoding and decoding, arithmetic operations like multiplying and dividing arrays, calculating distance matrices and more. A few other issues related to writing fast MATLAB code are also covered.
    • A link to this paper on Peter J. Acklam's home page.

VBA and Excel

Which Language?




Document Preparation


  • LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. Failed to parse (unknown function\LaTeX): \LaTeX
is the de facto standard for the communication and publication of scientific documents.



LaTeX Packages

These are some of my favourite Failed to parse (unknown function\LaTeX): \LaTeX

  • listings — The listings package is a source code printer for Failed to parse (unknown function\LaTeX): \LaTeX

. You can typeset standalone files as well as listings with an environment similar to verbatim as well as you can print code snippets using a command similar to \verb. Many parameters control the output and if your preferred programming language isn't already supported, you can make your own definition.

  • PSTricks — a collection of PostScript based Failed to parse (unknown function\TeX): \TeX
macros that is compatible with most Failed to parse (unknown function\TeX):  \TeX 
macro packages, including Failed to parse (unknown function\LaTeX):  \LaTeX 
that implements colour, graphics, rotation, trees and overlays. It's extremely useful for diagrams, such as phase portraits, etc.