THE REINSURANCE ACTUARY
  • Blog
  • Project Euler
  • Category Theory
  • Tutoring
  • Disclaimer

Python script - scrape CME FedWatch predictions

8/4/2022

 

I wrote a python script which uses Selenium to scrape the predictions for Fed rate movements from the CME FedWatch tool.

www.cmegroup.com/trading/interest-rates/countdown-to-fomc.html#resources

The tool works by converting the price of a 30 day Fed Fund future into an implied probability of a given range of yields.

The CME website embeds the output in a something called an 'iframe', which I had never heard of before, and the iframe then contains a dashboard powered by something called Quikstrike. It took me a while to figure out how to switch focus to the iframe, as you can't simply reference elements inside the iframe without first switching focus.

The script below may not look too complicated, but believe me, it took a while to write.

Picture
Old Federal Reserve building Philadelphia, Source: https://commons.wikimedia.org/wiki/User:Beyond_My_Ken

Read More

Notes on the Excel Forecast.ETS function

1/4/2022

 


The official Microsoft documentation for the Excel Forecast.ETS function is pretty weak [1]. Below I’ve written a few notes on how the function works, and the underlying formulas.
Picture
Source: Microsoft office in Seattle, @Coolcaesar, https://en.wikipedia.org/wiki/File:Building92microsoft.jpg

Read More

Tallying the estimates of Insured Market Loss from the Ukraine Conflict

25/3/2022

 


It's still very early days to understand the true fallout from Russia's invasion of Ukraine, but I thought it would be interesting to tally a few of the estimates for the insured loss we've seen so far, all of the below come from the Insider. 

Please note, I'm not endorsing any of these estimates, merely collating them for the interested reader! 
Picture
Kiv Perchersk Lavra Monastery, Kyiv. @Andriy155

Read More

Aggregating probability forecasts

18/3/2022

 

There's some interesting literature from the world of forecasting and natural sciences on the best way to aggregate predictions from multiple models/sources.

For a well-written, moderately technical introduction, see the following by Jaime Sevilla:
forum.effectivealtruism.org/posts/sMjcjnnpoAQCcedL2/when-pooling-forecasts-use-the-geometric-mean-of-odds

Jaime’s article suggests a geometric mean of odds as the preferred method of aggregating predictions. I would argue however that when it comes to actuarial pricing, I'm more of a fan of the arithmetic mean, I'll explain why below.
Picture

Read More

Python script - PredictIt API

11/3/2022

 

I wrote a quick Python script to download the latest odds from PredictIt, and then output to an Excel file. I've pasted it below as an extract from a Jupyter notebook:

PredictIt is an online prediction website, mainly focused on Political events:
www.predictit.org/

I think it's great that PredictIt allow access like this, before I realised the API exists I was using Selenium to scrape the info through Chrome, which was much slower to run, and also occasionally buggy.


Read More

Cefor Exposure Curves - follow up

7/3/2022

 

The Cefor curves provide quite a lot of ancillary info, interestingly (and hopefully you agree since you're reading this blog), had we not been provided with the 'proportion of all losses which come from total losses', we could have derived it by analysing the difference between the two curves (the partial loss and the all claims curve)

Below I demonstrate how to go from the 'partial loss' curve and the share of total claims % to the 'all claims' curve, but you could solve for any one of the three pieces of info given two of them using the formulas below.
​
Picture
Source: Niels Johannes  ​https://commons.wikimedia.org/wiki/File:Ocean_Countess_(2012).jpg

Read More

Cefor Exposure Curves

3/3/2022

 

I hadn't see this before, but Cefor (the Nordic association of Marine Insurers), publishes Exposure Curves for Ocean Hull risks. Pretty useful if you are looking to price Marine RI. I've included a quick comparison to some London Market curves below and the source links below.

Picture

Read More

An Actuary learns Machine Learning - Part 11 - Titanic revisited & Gradient Boosting Classifiers

8/10/2021

 

Picture



In which we try out the best performing algorithm from our house price prediction problem - Gradient Boosted Regression - on the Titanic problem, but don't actually manage to improve on our old score...




​
Source: https://somewan.design


Read More

German Flooding - tail position – second update

30/9/2021

 

This post is a follow up to two previous posts, which I would recommend reading first:
https://www.lewiswalsh.net/blog/german-flooding-tail-position
https://www.lewiswalsh.net/blog/german-flooding-tail-position-update
 
Since our last post, the loss creep for the July 2021 German flooding has continued, sources are now talking about a EUR 8bn (\$9.3bn) insured loss. [1] This figure is just in respect of Germany, not including Belgium, France, etc., and up from \$8.3bn previously. 

But interestingly (and bear with me, I promise these is something interesting about this) when we compare this \$9.3bn loss to the OEP table in our previous modelling, it puts the flooding at just past a 1-in-200 level. 
Picture
Photo @ Jonathan Kemper - https://unsplash.com/@jupp

Read More

NOAA, Property Cat Reinsurance Pricing, and 5 year burns

21/9/2021

 

Here are two events that you might think were linked:

Every year around the month of May, the National Oceanic and Atmospheric Administration (NOAA) releases their predictions on the severity of the forthcoming Atlantic Hurricane season.

Around the same time, US insurers will be busy negotiating their upcoming 1st June or 1st July annual reinsurance renewals with their reinsurance panel. At the renewal (for a price to be negotiated) they will purchase reinsurance which will in effect offload a portion of their North American windstorm risk.

You might reasonably think – ‘if there is an expectation that windstorms will be particularly severe this year, then more risk is being transferred and so the price should be higher’. And if the NOAA predicts an above average season, shouldn’t we expect more windstorms? In which case, wouldn't it make sense if the pricing zig-zags up and down in line with the NOAA predictions for the year?

Well in practice, no, it just doesn’t really happen like that. 
Picture
Source: NASA - Hurricane Florence, from the International Space Station

Read More

German Flooding - tail position - update

31/8/2021

 

This post is a follow up to a previous post, which I would recommend reading first if you haven't already:
https://www.lewiswalsh.net/blog/german-flooding-tail-position


In our previous modelling, in order to assess how extreme the 2021 German floods were, we compared the consensus estimate at the time for the floods (\$6bn insured loss) against a distribution parameterised using historic flood losses in Germany from 1994-2020. Since I posted that modelling however, as often happens in these cases, the consensus estimate has changed. The insurance press is now reporting a value of around \$8.3 bn [1]. So what does that do for our modelling and our conclusions from last time?
​

Read More

German Flooding - tail position

23/7/2021

 

As I’m sure you are aware July 2021 saw some of the worst flooding in Germany in living memory. Die Welt currently has the death toll for Germany at 166 [1].

Obviously this is a very sad time for Germany, but one aspect of the reporting that caught my attention was how much emphasis was placed on climate change when reporting on the floods. For example, the BBC [2], the Guardian [3], and even the Telegraph [4] all bring up the role that climate change played in the contributing to the severity of the flooding.

The question that came to my mind, is can we really infer the presence of climate change just from this one event? The flooding has been described as a ‘1-in-100 year event’ [5], but does this bear out when we analyse the data, and how strong evidence is this of the presence of climate change? 
​
Picture
Image -  https://unsplash.com/@kurokami04
​

Read More

Bayesian Analysis vs Actuarial Methods

21/4/2021

 

David Mackay includes an interesting Bayesian exercise in one of his books [1]. It’s introduced as a situation where a Bayesian approach is much easier and more natural than equivalent frequentist methods. After mulling it over for a while, I thought it was interesting that Mackay only gives a passing reference to what I would consider the obvious ‘actuarial’ approach to this problem, which doesn’t really fit into either category – curve fitting via maximum likelihood estimation.

On reflection, I think the Bayesian method is still superior to the actuarial method, but it’s interesting that we can still get a decent answer out of the curve fitting approach.

The book is available free online (link at the end of the post), so I’m just going to paste the full text of the question below rather than rehashing Mackay’s writing:

Read More

Poisson Distribution, Claims Frequency, and Independence

11/4/2021

 

I received an email from a reader recently asking the following (which for the sake of brevity and anonymity I’ve paraphrased quite liberally)

I’ve been reading about the Poisson Distribution recently and I understand that it is often used to model claims frequency, I’ve also read that the Poisson Distribution assumes that events occur independently. However, isn’t this a bit of a contradiction given the policyholders within a given risk profile are clearly dependent on each other?

It’s a good question; our intrepid reader is definitely on to something here. Let’s talk through the issue and see if we can gain some clarity.

Read More

Normalized combined ratios

22/3/2021

 

Financial Year 2020 results have now been released for the top 5 reinsurers and on the face of it, they don’t make pretty reading. The top 5 reinsurers all exceeded 100% combined ratio, i.e. lost money this year on an underwriting basis. Yet much of the commentary has been fairly upbeat. Commentators have downplayed the top line result, and have instead focused on an ‘as-if’ position, how companies performed ex-Covid.
​
We’ve had comments like the following, (anonymised because I don’t want to look like I’m picking on particular companies):

"Excluding the impact of Covid-19, [Company X] delivers a very strong operating capital generation"

“In the pandemic year 2020 [Company Y] achieved a very good result, thereby again demonstrating its superb risk-carrying capacity and its broad diversification.”

Obviously CEOs are going to do what CEOs naturally do - talk up their company, focus on the positives - but is there any merit in looking at an ex-Covid position, or is this a red herring and should we instead be focusing strictly on the incl-Covid results?

I actually think there is a middle ground we can take which tries to balance both perspectives, and I’ll elaborate that method below.

Read More

<<Previous
Forward>>

    Author

    ​​I work as an actuary and underwriter at a global reinsurer in London.

    I mainly write about Maths, Finance, and Technology.
    ​
    If you would like to get in touch, then feel free to send me an email at:

    ​[email protected]

      Sign up to get updates when new posts are added​

    Subscribe

    RSS Feed

    Categories

    All
    Actuarial Careers/Exams
    Actuarial Modelling
    Bitcoin/Blockchain
    Book Reviews
    Economics
    Finance
    Forecasting
    Insurance
    Law
    Machine Learning
    Maths
    Misc
    Physics/Chemistry
    Poker
    Puzzles/Problems
    Statistics
    VBA

    Archives

    May 2026
    February 2026
    December 2025
    November 2025
    October 2025
    February 2025
    April 2024
    February 2024
    November 2023
    October 2023
    September 2023
    August 2023
    July 2023
    June 2023
    March 2023
    February 2023
    October 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    October 2021
    September 2021
    August 2021
    July 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    May 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    April 2019
    March 2019
    August 2018
    July 2018
    June 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    April 2016
    January 2016

  • Blog
  • Project Euler
  • Category Theory
  • Tutoring
  • Disclaimer