Sum of reciprocal primes

Last week, in A Prime Discussion, I asked the question if the harmonic series of prime numbers, i.e.,
coverges or not. Well, the answer is: It does not converge but grow beyond any limit. The following proof follows ideas by the famous Paul Erdös, and is an extended and translated version taken from

We numerate the prime numbers in increasing order, i.e

Assume that the harmonic series of primes would converge. Then there would be a number m such that

and consequently, for any number N (which we will choose below).

Let us define now the "small prime numbers" to be {p1, p2, ...., pm} and the "large prime numbers" to be all others.
Further, let NS be the count of numbers ≤ N that have only small prime factors (in the above sense) and let NL be the count of numbers ≤ N that have at least one large prime factor. Thus
 NL + NS = N

We observe that [N/p] (with [x] denoting the integer part of x) is the number of multiples of p smaller or equal N and therefore

To estimate NS, we write any number n that is made up of only small prime factors as
where an is the product of all square free prime factors and bn2 be the product of quadratically occuring prime factors. (An example: for n=2400, an would be 6, bn would be 20).
In an, any small prime number occurs either with an exponent of 1 or 0. That is, there are at most 2m possibilities for an. For bn, we obtain bn ≤ √n ≤ √ N that there are at most √ N possibilities.
NS ≤ 2m √ N
on the other hand, due to NL< N/2, we have NS > N/2.
When we choose N (which is still free to be chosen) as N= 22m+2, we obtain that
NS ≤  22m+1 < NS ,
a contradiction. Therefore, the assumption "The series of reciprocal primes converges" must have been wrong. 

My Three Reasons To Leave a Paradise

The last four years I have rented a summer apartment in an old post station at one of Austria's most beautiful lakes - Lake Attersee. Gustav Mahler resided four years from 1893 to 1896, just nearby. Most in his small composer's cottage.

He once said to a friend: "No need to look there any more - that`s all been used up and set to music by me".

A few days ago, my wife and I decided to give the apartment up and last weekend we moved our belongings back to Linz. The collage above gives an impression of this last day in paradise. 

We enjoyed so many exciting and inspiring stays there.

Hiking, swimming, reading, working on critical concepts and plans...getting the catch of the day from the fisherman at our boat house, among them the rare, delicious lake chars living a meager life in 70m depth…

It is so quiet there, the views are so stunning, the woods are greener, the trees higher, the water clearer, the sun brighter, the sky bluer…of course.

Why? - asked our friends surprised
  1. I like to explore new places
  2. I like to travel
  3. I want to avoid that a place becomes "a shadow of my mind"
When this post is published, I'm heading to Cormons, Friuli, IT. I'll visit Aquila d'Oro at the Castello di Trussio, Dolegna - one of my favorite restaurants… I haven't been there for four years.

I want to fight my worst enemy: happy with a routine. The Attersee impressions have been set to some ideas... Time to become a free time nomad again.

No Chief Executive Quant on Board?

RBS has an excellent quant team. They introduce(d) innovative solutions, explain(ed) how they work at conferences, open workshops...and describe(d) them in books. What they recommend(ed) is widely copied in the quant finance circles…

But the bosses?

Before the 2008 collapse RBS was briefly the largest bank in the world…subsequently, RBS fell sharply in ranking, lost confidence and needed significant support from the UK government. They and their bosses were in the bad news...

We know it, the Lehman earthquake grew to a financial tsunami..

But still, did the management not listen to the quant team? Ignore them? Were the new products inside their investment banking just a mystery to them? Some say, they micromanaged the wrong things, see Braveheart banking; the fall of RBS.

I'm not a management expert, but I had a lot of bosses myself, before I started up my own business.

We all hate our bosses, right?

They always let us do the hard stuff? They just harvest our great output?

I never felt that way…and I did a few hard jobs: I cleaned the slag gutter of a blast furnace, arbitrated bulky scrap for input into a steel mill, harvested tobacco…in hard but above medium wage summer jobs.

The bosses enabled my full time studies. No reason to get mad on them.

Work hard to become a managing mathematician?

Later, I became a boss myself...responsible for a hundred people developing factory automation software. I reporting to the C level…It was an exciting time. Our own CNC machine and robot programming systems with operation and tool lifecycle management, shop floor control…intelligently combined with inlicensed CAE, resource and production management systems…ran in automated factories of renowned discrete manufacturers.

They were work of talented engineers, mathematicians, physicists, computer scientists…obviously we applied quantitative theories.

But in the late 80s, the C level managed a dramatic downturn of the entire enterprise and got fired completely. I got a new boss. A bureaucrat managing in the sense of "nobody has been ever fired for buying IBM"...

I quit…but I left the work without any bad feeling. It was a great time. I felt, like an entrepreneur in a large, old firm (actually, I started with a group of three)…and stared up my own business.

I don't know any CEQ

in a financial institution that is not part of the entrepreneurship.

In My Life as a Quant, Emanuel Dermal relives his exciting journey of a high-energy physicist becoming a managing director...he worked with Fisher Black at Goldman Sachs...and they were celebrated for their models and methodologies and they enjoyed working in a collaborative environment. They were kind of entrepreneurs in a large, old firm.

This was in the infancy of quaint finance, there were not so much proven and affordable technologies available.

But, discussing in quant finance forums, I'm surprised that

Reinventing the wheel

seems to be still attractive.
I want to create a FinancialEngineering library with generic financial engineering functions   throughout the various models and asset classes. Create a parent class in C++...?
was a question at a home page Serving the Quant Finance Community>>Programming and SW Forum.

Really? Was the first reply, but then the discussion went into details of C++ 11, modern C++ design…

But, there's great technology available

Obviously, it's not only us who can say: We spend years developing. Carefully choosing the mathematics. Mapping every practical detail. For pricing and calibration. For derivative and risk analytics. For structuring. For portfolio across scenario simulation…thousands of practitioners test our technologies on a vast variety of deal types, valued hundreds of billions of USD on a daily basis…

Quantitative managers optimize market risk?

They empower quants becoming a new generation of quantitative managers. Do on a much higher level what renowned quants did in the earlier days of quant finance?

You can't manage and do the plumbing. But you also can't be a quantitative manger without knowing the theories, methodologies and technologies either. To do one thing for your financial institution: optimize risk.

This would qualify for a C Level position?!

Back to factory automation. There's a vast variety of great technology available now. It's not economically feasible at all to build your own computer aided manufacturing system...from scratch, now.

It was never so easy…

RBS seems to have an insight sales strategy…RBS Insight…but do they have a CEQ?

Description of term structure movements using PCA continued

In my last blog entry How good is the description of term structure movementsusing PCA a lot of open questions remained. Today I want to give first answers...
 - How good is the description of interest rate movements using only a few factors?
We assume, that we have a time series of  yield curves , where each of them is given on 16 curve points (1W,3M,6M,9M,1Y,2Y,3Y,4Y, 5Y,7Y,10Y,15Y, 20Y,25Y, 30Y,50Y). Calculating the principal components ei, based on daily interest rate movements, the increments of the yield curve dr =(dr1,…,dr16) can be exactly described using the formula

 where (.,.) is defined to be the inner product of two vectors. The following pictures show, how good an arbitrary chosen interest rate increment (blue curve) can be approximated using only 4 (left), 5 (middle), 6 (right) factors, i.e.

The table below shows, how many percent of the variance of daily, weekly and monthly historical interest rate movements can be described using only a few PCA factors:


Using a time series of daily EUR interest rate movements, the following picture shows the variation of the original data (left) and the remaining variation (right) after the filtration of the first four principal components. One can see, that on average about 1 basis point of the interest rate movements remain unexplained.


So, using a few principal components for the description of interest rate movements, leads to a good approximation of the original data. Furthermore, combinations of principal components produce  realistic yield curve scenarios, which can be used for the calculation of interest rate risk measures of instruments and portfolios. 

UnSelling UnRisk?

First There Was UnMarketing Now There Is UnSelling - this post of "Six Pixels of Separation" pointed me to this book about everything but to sell.

UnSelling is about the bigger picture of sales.

Analogical, UnRisk is about the bigger picture of risk.

In both cases you need a lot of experience and in depth knowledge to get the bigger picture.

But yes, it is sometimes indispensable to unlearn. The rules of selling - as well as the rules of risk management - have fundamentally changed.

The programmability of sales by understanding value, access and education and the programmability of risk by understanding money, duality, boundaries and optimization…come to my mind.

A Surprising Entrepreneurship Paradox

With affordable technologies and tools, better communication channels, skill sharing…it has never been easier to start your own company, but entrepreneurship is in the decline.

I'd not have believed that the decline happens for years, before I read about the Entrepreneurship Paradox at Pieria.

Concluding, it seams that the future is becoming old, like the rest of us (entrepreneurs)? Why is this so? Do the (business) failure rates of younger firms increase? Does it need (too much) time to become antifragile? Do entrepreneurs hate to manage?

OK, entrepreneurship at the high-tech sector started declining after the dot-com crash. But the dot-com boom triggered a broadband emergence that helps entrepreneurship?

What to do? IMO, for a vibrant, growing economy, older firms should co-operate much more with the younger and fight the worst enemy: be happy with the achieved, together.

Reading this, has inspired me to write about the development of a quant entrepreneurship (dependent or independent). I will post it on Tuesday.  

A Must Read for People Working on Counterparty Risk

Today's blog post will be a short review of the book

Counterparty credit risk and credit value adjustment: A continuing challenge for global financial markets – Second Edition by Jon Gregory

I have been working on the xVA topic now for almost two years and this book guided me for most of this time. The author Jon Gregory is the acknowledged global expert on counterparty credit risk.
The book starts with explaining the emergence of counterparty risk and how financial institutions are developing capabilities for valuing it. Aspects of portfolio management and hedging of credit value adjustment, debit value adjustment, and wrong-way counterparty risks are also covered. In addition, the book addresses the design and benefits of central clearing, a recent development in attempts to control the rapid growth of counterparty risk. The book offers many practical examples, including experiences from the recent credit crisis.

Without using too much complicated Mathematics Gregory is able to explain also complex interrelations. I can really recommend this book to everybody interested in the topic.

This Ideas Must Die

Whenever I'm in London I spare time to visit the Serpentine Galleries. Their program inspired me to look playfully into the past from a future perspective as posted here, think about skills exchange as posted here, …

Serpentine and Edge announce a Marathon on "Extinctions"  - among many exciting (and cool) contributions, it touches one thing that address muscles in my brain that I rarely use: there is no such thing as an abstract program … the principle of Constructor Theory (Physics)…Extinction of abstraction?

Edge's own contributions to the conversation will be published in Feb-15. This Ideas Must Die - Scientific Theories That Are Blocking Progress.

I cannot go, but it will be live-streamed here and I'll read the book.

A Prime Discussion

Last week, I met a former colleague, who is now working in risk management of an Austrian bank. It was a very enjoyable evening with a few beers and memories of the times when we were undergraduate students.

This obviously (at least for mathematicians) led us to prime numbers.

So, today's question:
Does the harmonic series of prime numbers, i.e.,


I will sketch a proof (whether it converges or not) next week.

Although prime numbers seem to belong to pure mathematics, there are at least two important applications in finance: one is for encrpyting information by the RSA algoithm, the other one is for generating low discrepancy numbers.

What Is UnRisk For? - Updated

Jan-13, I posted what is UnRisk for

Is it still valid? Yes, nothing changed - in principle. Derivative and risk analytics serving the core business of various financial market participants and actors.

Individualization in centralized regimes?

But, the regulatory wave has brought a paradox into play. Central counter party is intended to reduce risk by standardization…but ironically, it forces certain market participants, like banks, to individualize their offerings in order to find new services and clients.

Remember, because of margin compression, OTC revenues will be / are reduced… However, central clearing also offers new revenue opportunities for banks, like execution and clearing revenues, collateral management services fees… (banks can help clients to fulfill obligations...)

Can you structure me this?

The new question: do you support xVA? needs fanning.

It's not only different for pricing, valuation and risk management, actors in various roles need different ways to deal with it. Sales, front office, risk management, controlling… practitioners and quants in interplay.

Simpler instruments became the new "structured products" under the new regimes. We were always good at valuing structured products and analyzing their contribution to risk in complex portfolios. We've put our best effort in doing it right again in the new regimes. Accuracy and speed really matter, if you need millions of valuations to get a "fair" price and risk spectra.

Technologies, development tools and solutions

The technologies behind are identical, but it will be even more important in the future to configure them for special actor groups and tasks. And enable quant developers to transform them into individual solutions for certain purposes swiftly.

You're lucky if you have a technology stack that supports this. You're even luckier if you have organized them orthogonally. And most lucky if you have created a financial language to programmatically manipulate the financial objects, contract features, frame conditions…implemented it in engines that are bank proof. We're lucky.

It empowers us to launch new products along a technology path in the near future. Exciting products - I'll keep you informed.