## Going off the peg – the Swiss case

So, the Swiss National Bank dropped its peg of the CHF against the EUR of 1.20, to the complete surprise of … well, anbydody, I suppose. As a result, the EUR dropped to lows of 0.975, according to yahoo, and remaining at 0.99 at pixel time.

The Swiss case is different from the normal case of a central bank stopping to defend a peg, because usually it has to defend against a depreciation of its currency, usually by selling its foreign reserves. Of course, such a defense is not sustainable in the long run, as foreign reserves are finite, if the fundamentals favor a depreciation.

Theoretically, these mechanisms have been well understood since the papers from Krugman on currency crises and later by Obstfeld on multiple equilibria, which explain speculative effects in a grey zone of so-so fundamentals, which could, for example, be effected by contagion. The practical results were very visible in the Asian crisis of 1997, and but for the political costs of leaving the EUR, we would have witnessed it in Europe in the last couple of years.

This is a matter close to my heart, as I wrote my diploma thesis on this subject, in an attempt to develop an early warning indicator. But even if that indicator would be still updated, and worked reasonably well, it would have missed the Swiss case – it was looking for depreciations against the central currency. But the SNB defended against appreciation, and theoretically, it should have been able to do so indefinitely, as it could just have kept on selling CHF against EUR.

Another indicator apparently also proved desastrous for a number of retail FX brokers – Value at Risk based on historical volatility. At least one broker declared insolvency, another is talking with regulators and investors about raising fresh capital, a number halted trading CHF. Here is an overview.

With a peg, of course the volatility would decline continously, lowering VaR. This allowed these brokers to decrease the required margin for their retail traders, or increase their leverage, with many brokers requiring only 2% margin. Those trades of course are completely underwater, and unless the traders answer the margin calls, the brokers have serious liquidity shortfall.

So, why did the SNB act like it acted? I can only speculate, of course, but here are some points whih I think are at least noteworthy:

• While having a positive current account overall, it’s current account with the EU is negative, therefore appreciation would help closing this gap.
• In a similar way, pegging to the EUR lead to depreciation against the USD and other major currencies, which might have lead to the impression that the pressure to appreciate the CHF against the trade wheighted basket has vanished to a manageable degree.
• Expectations of European quantitative easing would weaken the EUR further, accelerating the growth of the SNB’s balance sheet, which might have been seen as a political liability.  This I don’t find very convincing, as the SNB is independent from direct government intervention, and a referendum to prescribe a minimum holding of gold as reserves just lost a popular vote, strengthening its independence further.
Veröffentlicht unter Allgemein | Hinterlasse einen Kommentar

## Bitcoin market mechanism vs money market mechanism

Lateley, i have become interested in the question of the utility of the cryptocurrency bitcoin, especially in relation to traditional currencies like USD or EUR, which I will call fiat currency in the remainder, signifying a currency wich is not commodity based, as is the norm.

TL, DR: Compared to a fiat money economcy, gdp growth in a bitcoin economy is limited by the constant growth rate of the money supply.

In the following, I want to compare the market mechanism of bitcoin in relation to the money market mechanism of a fiat currency.

The analysis is based on following assumptions, first regarding supply and demand of bitcoin

• Bitcoins are mined by solving mathematical puzzles, which have no further value, the creation of bitcoin is the only source of income for the miners
• The cost of mining results solely from hardware and energy costs, whose prices move proportionally to the general price index of the economy. Demand from miners is assumed to have no influence on the general price index.
• The difficulty of the puzzles is instantly adjusted, so that the global increase in the stock of bitcoin is constant.
• Consumers can freely borrow or save bitcoin at the nominal interest rate
• The bitcoin is the sole currency used in a small closed economy.

With regard to the fiat currency, I make the following assumptions:

• Fiat currency is generated by the central bank, which adjusts the supply of money in accordance with a constant rate of inflation.
• Consumers can freely borrow or save fiat currency at the nominal interest rate
• The fiat currency is the sole currency used in a small closed economy.

With regard to money demand, I make the following assumptions:

• Money demand changes proportional to economic activy as measured by gdp growth rate
• The nominal interest rate increases with an increase in excess money demand.
• The price index increases with a increase in excess money supply, and an excess in goods demand.
• The gdp growth rate increases with a decrease of the real interest rate

Both economies are assumed to be in steady state before an exogene shock to the economy, both money stocks increase at the current gdp growth rate. This shock is an increase in the gdp growth rate following an increase in government spending.

First, the reaction in the bitcoin economy:

1. Excess goods demand lead to an increase in the demand for bitcoin.
2. The increase in bitcoin supply is insufficient to satisfy the excess demand, leading to an increase in the nominal interest rate and a decrease of the price index.
3. Both effects lead to an increase in the real interest rate, leading to a decrease of the gdp growth rate, which leads to a decrease of excess bitcoin demand. This continues until the excess demand for bitcoin is zero, and gdp growth is back to steady state.

Now, the reaction in the fiat currency economy.

1. Excess godds demands lead to an increase in money demand and increase in price index
2. Increase in money demand leads to rising nominal interest rates. Increase in price index leads to central bank increasing money supply undtil the excess money demand is zero.
3. Relative to the starting point, the real interest rate is higher than before, leading to a decrease in gdp growth rate.

In contrast to the bitcoin case, there is no necessety for the gdp growth rate to return to the old steady state, which depends on constant growth of money supply.

Veröffentlicht unter Theorie | Verschlagwortet mit , | Hinterlasse einen Kommentar

## On Russia

The russion CB hiked the policy rate tonight form 10.5% to 17.0%. In the market this lead to a nearly parallel shift of the yield curve with steepening in the 1-5 year range.

For me, this leads to some question:

• How large is the duration mismatch of the Russian banks?
• Assuming it is not trivial, how long will the banks survive the inverted yield curve?

The macro problems of Russia show all the symptoms of dutch disease – a strong ressource sector leading to real appreciation of the Ruble, making the rest of the economy less competetive. The current abrupt reversal following the decline in oil prices kills the forex inflow on which domestic consumption of imports relied, making the interest rake hike necessary. This finally kills investments in the private sector, which would be necessary to capitalize on the new terms of trade by increasing exports and consumption of domestic goods.

PS: Gone with the wind – after gaining  10% in early trading after the hike, the ruble lost all gains before lunch.

Veröffentlicht unter Allgemein, Theorie | Verschlagwortet mit , | Hinterlasse einen Kommentar

## Differences in Draft and Final Delegated Acts (Solvency II)

The Solvency II Delegated Acts have been published by the EU commission yesterday. My last draft version was from July of this year, so I wanted to compare the versions for any differences. I exported the text from PDF to .txt files and uploaded them into a gist as revision 1 and 2. The github diff stops at a certain point, so you would have to download the text versions and use your own diff software.

On the whole, this version has only very minor changes, with the exception of the treatment of securitisations in the spread risk module. On first glance it seems to be that the defintition of type 1 securitisations has been tightend, and the capital charge for this type has been reduced, which would fit to the recitals 91 and 92.

If anybody wants to diff the more widely circulated March version of the draft with the final version, I would suggest to save that work and just use the annotated pdf available on Petter Svensons site for the July version.

Here are the material differences that I can spot:

• New recital 67: Rationalization for the operation risk module of the standard formula.
• Enhanced recital 91 (former 90) and new recital 92: Stressing importance of regulating use of securisitations.
• Art. 13, new point 6 – allowing for valuation of related undertakings according to local gaap under conditions.
• Article 177: Fine-tuning, which securitisations belong to type 1 or type 2.
• Article 178: Lowering spread risk for securitisation type 1 with CQS 2 or 3.
• Article 204: Technical Provisions can be adjusted for transitional adjustments when calculating OpRisk.
• Article 250, 251: Technical Provisions can be adjusted for transitional adjustments when calculating linear component of MCR.

Veröffentlicht unter Regulierung | Verschlagwortet mit | 2 Kommentare

## Scratching that itch from ifelse

Okay, as I wrote yesterday, ifelse is rather slow, at least compared to working in C++. As my current project is using ifelse rather a lot, i decided to write a small utility function. In the expectation that I will collect a number of similar functions, I made a package out of it and posted it on github: https://github.com/ojessen/ojUtils

I get a speedup of about 30 times, independent of the target type.

Feedback and corrections greatly appreciated.

Thanks to the people at Travis for providing a free CI server which works directly with github. This of course is a tiny example, but it is good to know that the workflow to set this up can be done in 5 minutes.

And thanks to Romain Fraoncois for showing some Rcpp sugar:

Some data:

require(ojUtils)
## Loading required package: ojUtils
require(microbenchmark)
## Loading required package: microbenchmark
test = sample(c(T,F), size = 1e5, T)
yes = runif(1e5)
no = runif(1e5)

microbenchmark(ifelse(test, yes, no), ifelseC(test, yes, no))
## Loading required package: Rcpp
## Unit: microseconds
##                    expr   min      lq  median      uq    max neval
##   ifelse(test, yes, no) 31925 33404.8 34065.1 58083.5  71891   100
##  ifelseC(test, yes, no)   620   647.5   721.8   817.7 209254   100
test = sample(c(T,F), size = 1e5, T)
yes = rep("a", 1e5)
no = rep("b", 1e5)

microbenchmark(ifelse(test, yes, no), ifelseC(test, yes, no))
## Unit: milliseconds
##                    expr    min     lq median     uq   max neval
##   ifelse(test, yes, no) 57.313 58.763 59.626 72.435 87.92   100
##  ifelseC(test, yes, no)  1.747  1.837  1.926  2.749 29.56   100
test = sample(c(T,F), size = 1e5, T)
yes = rep(1L, 1e5)
no = rep(2L, 1e5)

microbenchmark(ifelse(test, yes, no), ifelseC(test, yes, no))
## Unit: microseconds
##                    expr     min      lq  median      uq   max neval
##   ifelse(test, yes, no) 30747.6 31868.5 32274.8 32829.0 59412   100
##  ifelseC(test, yes, no)   453.7   548.9   581.5   646.2 27575   100
test = sample(c(T,F), size = 1e5, T)
yes = rep(T, 1e5)
no = rep(F, 1e5)

microbenchmark(ifelse(test, yes, no), ifelseC(test, yes, no))
## Unit: microseconds
##                    expr     min      lq  median      uq   max neval
##   ifelse(test, yes, no) 29331.2 31167.3 31719.7 32455.3 60589   100
##  ifelseC(test, yes, no)   460.1   537.1   566.8   640.7 27118   100
Veröffentlicht unter Allgemein | Verschlagwortet mit , , | Hinterlasse einen Kommentar