<?xml version="1.0" encoding="UTF-8"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>Latest blog posts</title><link>https://pjlee.net/blog/rss/</link><description /><atom:link href="https://pjlee.net/blog/rss/" rel="self" /><language>en-us</language><lastBuildDate>Tue, 07 Apr 2026 22:45:15 +0000</lastBuildDate><item><title>The Politics Actuary #12: Appliance Mortality</title><link>https://pjlee.net/blog/the-politics-actuary-12-appliance-mortality</link><media:content medium="image" url="https://cdn.buttercms.com/yunGUG6TteQJiMWj3A1K" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 07 Apr 2026 22:45:15 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-12-appliance-mortality</guid><description>The Politics Actuary #12 — from the Actuaries in the Wild theme. The washing machine is leaking. Beth wants to call a repair person. Patrick wants to observe the claim for a while longer before making any rash decisions.</description><content:encoded><![CDATA[<p>The washing machine is leaking. There is a puddle on the kitchen floor. Beth is holding her phone, ready to call a repair person like a normal human being.</p>
<p>Patrick is on his hands and knees, examining the appliance with the focused scepticism of a claims assessor who has seen this sort of thing before. Is it genuinely broken? Or is it just having a bad day? These are different things, and they have very different reserving implications.</p>
<p>The Post-it note on the front reads "DOD: TBC &mdash; monitor." Patrick has seen appliances stage miraculous recoveries before. Premature settlement would be irresponsible.</p>
<p>Pucktick, for his part, has found the puddle and is perfectly happy.</p>
<p><img src="https://cdn.buttercms.com/CaZn3CCTYn5ZVVxMTCdg" alt="undefined"></p>
<p>The Actuaries in the Wild series follows actuarial thinking as it escapes the office and colonises everyday life &mdash; holidays, kitchens, birthday parties, and anywhere else a risk register has no business being. Previous entry: #8 Holiday Risk Assessment.</p>
<p>Previous cartoons: #1 Record Investment | #2 Y-Axis Trick | #3 Prompt Engineering | #4 Transparency Request | #5 Define Everyone | #6 Long-Term Assumption | #7 Excel Relapse | #8 Holiday Risk Assessment | #9 Confident Nonsense | #10 Nearly There | #11 Best Estimate</p>]]></content:encoded></item><item><title>Who's Hiring Graduate Actuaries for September 2026? A Sourced Snapshot</title><link>https://pjlee.net/blog/whos-hiring-graduate-actuaries-for-september-2026-a-sourced-snapshot</link><media:content medium="image" url="https://cdn.buttercms.com/xBreszcKRuyKsg5SJuOa" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 04 Apr 2026 18:48:45 +0000</pubDate><guid>https://pjlee.net/blog/whos-hiring-graduate-actuaries-for-september-2026-a-sourced-snapshot</guid><description>I set out to find how many graduate actuarial positions are available in the UK for September 2026. Nobody publishes that number — not the IFoA, not recruiters, not employers. So instead, here's a verified snapshot: 20 employers confirmed, starting salaries from £28,332 to £38,000, and some surprising comparisons with Army officers and teachers.</description><content:encoded><![CDATA[<div style="background: #fff3cd; border: 2px solid #ffc107; border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; font-size: 15px; line-height: 1.6;"><strong>CORRECTION (6 April 2026):</strong> A reader pointed out that the <a href="https://www.actuarialcareers.co.uk/bookstore/the-actuarial-profession-guide/" target="_blank" rel="noopener noreferrer">Actuarial Profession Guide 2025/26</a> (37th edition, published by actuarialcareers.co.uk in partnership with the IFoA) lists 32 employers in its Employer Directory, most of which publish their graduate intake numbers and UK locations. My original claim that &ldquo;no employer publishes how many graduates they hire&rdquo; was wrong &mdash; many of them do, in this guide, and have done for nearly four decades. I should have found it before publishing. Thank you to Andrew Watcham FIA (Director and Scheme Actuary, Isio) for the correction. The guide also lists several employers not covered in my research below, including Barnett Waddingham (30 graduates), Isio (57), LCP (60), XPS Pensions (30), and Gallagher (10), among others. I have corrected the relevant paragraphs below. The salary data, cross-sector comparisons, and IFoA pipeline analysis remain unchanged, as these are not covered in the guide.</div>
<p>How many graduate actuarial positions are available in the UK for September 2026? Is hiring up, down, or flat compared to last year?</p>
<p>These seem like straightforward questions. I spent a day trying to answer them. What I found &mdash; and what I got wrong &mdash; is itself worth reporting.</p>
<hr>
<h2 id="how-many-graduate-positions-are-there">How many graduate positions are there?</h2>
<p>The <a href="https://www.actuarialcareers.co.uk/bookstore/the-actuarial-profession-guide/" target="_blank" rel="noopener noreferrer">Actuarial Profession Guide 2025/26</a> (37th edition, published annually by actuarialcareers.co.uk in partnership with the IFoA) is the closest thing to a definitive answer. Its Employer Directory lists 32 firms recruiting actuarial trainees, and most publish their graduate intake numbers &mdash; from 1 (Atkin Pensions) to 100+ (Aon). A rough sum of the specific numbers gives approximately 400&ndash;500 graduate positions across the listed firms, though 12 of the 32 say &ldquo;Varies&rdquo; rather than giving a number. The guide does not attempt an industry-wide total, and smaller employers and non-traditional hirers are not included. What follows below is my own independent research, which found 20 employers &mdash; some overlapping with the guide, some not.</p>
<p>The IFoA publishes total membership (34,531 as at 2024/25, of whom 15,380 are students) but not how many new students register each year, or how many graduate positions employers collectively offer. Job boards count listings, not positions &mdash; and their numbers vary wildly depending on how broadly they define &ldquo;actuarial graduate&rdquo; (Glassdoor shows 13 in April 2026; LinkedIn shows 545 for ostensibly the same search).</p>
<p>So alongside the guide&rsquo;s data, here is a verified, sourced snapshot of every employer I could independently confirm is running a graduate actuarial scheme for September 2026.</p>
<hr>
<h2 id="20-employers-confirmed-for-september-2026">20 employers confirmed for September 2026</h2>
<p>I checked career pages, graduate aggregators (Bright Network, Gradcracker, Prospects, StudySmarter), and specialist actuarial job boards. The following employers have confirmed September 2026 actuarial graduate schemes, verified from their own career pages or structured listings on aggregator sites.</p>
<h3 id="consultancies">Consultancies</h3>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Employer</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Programme</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Locations</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Salary</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Status</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Source</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Aon</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">3 streams: GI/Reinsurance, Pensions London, Pensions Regional</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London + regional</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.aon.com/careers/early-careers/uk/graduates" target="_blank" rel="noopener noreferrer">Aon early careers</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">WTW</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Retirement Actuarial Graduate Trainee Consultant 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London, Manchester, Birmingham</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~&pound;31k (Glassdoor)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://talents.studysmarter.co.uk/companies/willis-towers-watson/2026-retirement-actuarial-graduate-trainee-consultant-programme-birmingham-12259014/" target="_blank" rel="noopener noreferrer">StudySmarter</a></td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">LCP</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Pensions &amp; Investment Technology Graduate &ndash; Sep 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London, Winchester</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Open (rolling)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.brightnetwork.co.uk/search/?s=actuarial+graduate+2026&amp;content_types=jobs" target="_blank" rel="noopener noreferrer">Bright Network</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">First Actuarial</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Opportunities 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Basingstoke + 6 more</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Open (rolling)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.brightnetwork.co.uk/search/?s=actuarial+graduate+2026&amp;content_types=jobs" target="_blank" rel="noopener noreferrer">Bright Network</a></td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Broadstone</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Graduate Trainee Actuary (Autumn 2026)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Bristol, Birmingham, Glasgow, London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;29,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Open</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://broadstone.current-vacancies.com/Jobs/Advert/3404779" target="_blank" rel="noopener noreferrer">Broadstone careers</a></td>
</tr>
</tbody>
</table>
</div>
<h3 id="big-4">Big 4</h3>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Employer</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Programme</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Locations</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Salary</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Status</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Source</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">PwC</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial (within Audit/Accounting/Tax/Finance graduate programme)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">UK-wide</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Sep 2026 start confirmed</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.pwc.co.uk/careers/early-careers/graduate/audit-accounting-tax-finance.html" target="_blank" rel="noopener noreferrer">PwC careers</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Deloitte</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Scheme 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Belfast</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (12 Feb 2026)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.brightnetwork.co.uk/graduate-jobs/deloitte/actuarial-graduate-scheme-2026" target="_blank" rel="noopener noreferrer">Bright Network</a></td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">EY</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Programmes &ndash; Sep 2026 (Pensions, Life, Non-Life)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Multiple UK</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (31 Jan 2026)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.prospects.ac.uk/employer-profiles/ey-28744/jobs/actuarial-graduate-programmes-september-2026-2704255" target="_blank" rel="noopener noreferrer">Prospects</a>, <a href="https://www.ey.com/en_uk/careers/students/programmes/graduates/actuarial-graduate-programme-options/actuarial-pensions-and-investments" target="_blank" rel="noopener noreferrer">EY UK</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">KPMG</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Programme (Level 7 apprenticeship, 3 years)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">UK</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~&pound;30k (Glassdoor)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Open</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.kpmgcareers.co.uk/graduate/consulting/actuarial/" target="_blank" rel="noopener noreferrer">KPMG Careers</a></td>
</tr>
</tbody>
</table>
</div>
<h3 id="insurers">Insurers</h3>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Employer</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Programme</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Locations</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Salary</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Status</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Source</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Aviva</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Pathway 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Bristol, Norwich, York</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;34,200</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (8 Dec 2025)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://aviva.apply.cappats.com/jobs/view/488" target="_blank" rel="noopener noreferrer">Aviva application</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">L&amp;G</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Graduate Actuarial Programme London 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London (rotations)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://careers.legalandgeneral.com/job/graduate-actuarial-programme-london-2026-in-london-jid-5869" target="_blank" rel="noopener noreferrer">L&amp;G careers</a></td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Phoenix / Standard Life</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Trainee Scheme</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Birmingham, Edinburgh</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Open</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.standardlifeplc.com/careers/actuarial-trainee-scheme" target="_blank" rel="noopener noreferrer">Standard Life careers</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Zurich</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">GI Graduate Programme 2026 + Life Graduate Programme 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London, Farnborough, Birmingham, Whiteley (GI); Swindon (Life)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;33,200</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (26 Oct 2025)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.careers.zurich.com/job/London-Actuarial-(General-Insurance)-Graduate-Programme-2026-GB-L/829276402/" target="_blank" rel="noopener noreferrer">Zurich careers</a>, <a href="https://www.brightnetwork.co.uk/graduate-jobs/zurich/actuarial-life-insurance-graduate-programme-2026" target="_blank" rel="noopener noreferrer">Bright Network</a></td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Just Group</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Programme 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.workatjust.co.uk/job-search/london2/just-group-actuarial-graduate-programme-2026-r5907/" target="_blank" rel="noopener noreferrer">Work at Just</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Vitality</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Analyst 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Bournemouth</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;28,332</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Open (15 Apr 2026)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.brightnetwork.co.uk/search/?s=actuarial+graduate+2026&amp;content_types=jobs" target="_blank" rel="noopener noreferrer">Bright Network</a></td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Beazley</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial UK Graduate Programme 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Birmingham, London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;33,000</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (3 Nov 2025)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.brightnetwork.co.uk/graduate-jobs/beazley-group/actuarial-uk-graduate-programme-2026" target="_blank" rel="noopener noreferrer">Bright Network</a></td>
</tr>
</tbody>
</table>
</div>
<h3 id="lloyds-market-banking-reinsurance-regulation">Lloyd's market, banking, reinsurance &amp; regulation</h3>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Employer</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Programme</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Locations</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Salary</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Status</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Source</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Lloyd's of London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Programme</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;38,000</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.lloyds.com/about-lloyds/careers/early-careers/graduates/actuarial-graduate-scheme" target="_blank" rel="noopener noreferrer">Lloyd's careers</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Arch Capital</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Programme 2026</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (17 Jan 2026)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.brightnetwork.co.uk/graduate-jobs/arch-capital-group/actuarial-graduate-programme-london-2026" target="_blank" rel="noopener noreferrer">Bright Network</a></td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">GAD</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Graduate Analyst</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London, Edinburgh</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;31,862</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (23 Nov 2025)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://www.actuarialcareers.co.uk/jobs/government-actuarys-department-gad-graduate-analyst-154119/" target="_blank" rel="noopener noreferrer">ActuarialCareers.co.uk</a></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">FCA</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Actuarial Graduate Programme</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not stated</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Closed (reopens Autumn 2026)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://fcacareers.tal.net/vx/mobile-0/brand-0/candidate/so/pm/1/pl/1/opp/40-Actuarial-Graduate-Programme/en-GB" target="_blank" rel="noopener noreferrer">FCA careers</a></td>
</tr>
</tbody>
</table>
</div>
<p>Additional employers visible on Bright Network but behind a login wall: <strong>Marsh</strong>, <strong>SCOR</strong> (x2 listings), and an additional <strong>L&amp;G</strong> listing.</p>
<hr>
<h2 id="what-about-lloyds-banking-group">What about Lloyds Banking Group?</h2>
<p>Lloyds Banking Group runs an actuarial graduate scheme offering <strong>&pound;42,000</strong> &mdash; the highest published starting salary of any scheme I found. However, their careers page currently shows "This opportunity is now closed for applications in 2025" and invites candidates to register interest. I could not confirm a 2026 intake has been announced. The scheme itself is notable for its 4-year duration and emphasis on Python, R, and Prophet alongside traditional actuarial work.</p>
<p>Source: <a href="https://www.lloydsbankinggrouptalent.com/our-opportunities/graduates/actuarial-graduate-scheme/" target="_blank" rel="noopener noreferrer">Lloyds Banking Group careers</a></p>
<hr>
<h2 id="what-do-they-pay">What do they pay?</h2>
<p>Seven employers publish their starting salaries explicitly. The range is <strong>&pound;28,332</strong> (Vitality, Bournemouth) to <strong>&pound;38,000</strong> (Lloyd's of London, London).</p>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Employer</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Starting salary</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Location</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Lloyd's of London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;38,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Aviva</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,200</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Bristol / Norwich / York</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Zurich</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;33,200</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Multiple</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Beazley</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;33,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Birmingham / London</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">GAD</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;31,862</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">London / Edinburgh</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Broadstone</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;29,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">York</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Vitality</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;28,332</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Bournemouth</td>
</tr>
</tbody>
</table>
</div>
<p>For comparison, here is what the British Army pays new recruits (from the <a href="https://jobs.army.mod.uk/regular-army/what-you-get/pay-benefits/" target="_blank" rel="noopener noreferrer">official Army careers page</a>):</p>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Role</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Starting salary</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Entry route</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Private (soldier)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;26,334</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Non-graduate</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Lance Corporal (e.g. Intelligence Corps, on completion of Phase 2 training)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,083</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Non-graduate</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Officer Cadet (Sandhurst)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,676</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Graduate</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2nd Lieutenant (after commissioning)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;41,456</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Graduate</td>
</tr>
</tbody>
</table>
</div>
<p>A graduate entering the Army as an officer earns &pound;34,676 during training and &pound;41,456 on commissioning &mdash; comparable to or above most actuarial graduate schemes, with the Army also providing free accommodation, healthcare, pension contributions, and 30 days' leave plus bank holidays. A non-graduate joining the Intelligence Corps reaches &pound;34,083 as a Lance Corporal after Phase 2 training &mdash; more than some actuarial graduate starting salaries. And here is what a newly qualified teacher earns (from <a href="https://getintoteaching.education.gov.uk/life-as-a-teacher/pay-and-benefits/teacher-pay" target="_blank" rel="noopener noreferrer">Get Into Teaching, GOV.UK</a>, as at September 2025):</p>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Region</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Starting salary</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">England (excluding London)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;32,916</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">London fringe</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,398</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Outer London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;37,870</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Inner London</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;40,317</td>
</tr>
</tbody>
</table>
</div>
<p>Teachers also receive a defined benefit pension with employer contributions of 28.6% &mdash; substantially more generous than most private sector pension schemes. A typical teacher reaches at least &pound;45,352 after 5 years.</p>
<p>These comparisons matter: actuarial employers are competing for numerate graduates against a much wider market than just other actuarial firms.</p>
<p>For broader context, the Hays UK Salary &amp; Recruiting Trends 2025 Guide (published via <a href="https://www.actuarialcareers.co.uk/profession-overview/actuarial-salaries-benefits-2025/" target="_blank" rel="noopener noreferrer">ActuarialCareers.co.uk</a>) provides market averages for graduate actuaries by region and sector:</p>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Sector</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">London</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">South</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Midlands</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">North</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Scotland</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">General Insurance</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;38,250</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;35,250</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,250</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;31,500</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&mdash;</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Life Insurance</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;39,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;33,500</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;27,750</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Pensions</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;34,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;30,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;30,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;28,000</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;28,000</td>
</tr>
</tbody>
</table>
</div>
<p><em>Source: Hays UK Salary &amp; Recruiting Trends 2025 Guide (GI and Pensions); 2024 Guide (Life)</em></p>
<p>These are averages across the market, not specific to any employer. The London premium is significant &mdash; around &pound;6,000&ndash;&pound;11,000 above regional rates. Pensions consulting pays less at graduate level than insurance, though the gap narrows with seniority.</p>
<p>Every scheme I checked offers full IFoA exam sponsorship: paid study leave, exam fees, study materials, and tutorials. Several (Zurich, Beazley, WTW) explicitly offer salary increases with each exam passed.</p>
<hr>
<h2 id="what-i-missed-and-whats-still-missing">What I missed &mdash; and what's still missing</h2>
<p>My original version of this article claimed that no employer publishes graduate cohort sizes. That was wrong. The <a href="https://www.actuarialcareers.co.uk/bookstore/the-actuarial-profession-guide/" target="_blank" rel="noopener noreferrer">Actuarial Profession Guide</a>, published annually for nearly 40 years, includes intake numbers for most of its 32 listed employers. I missed this definitive resource, and I&rsquo;m grateful to Andrew Watcham FIA (Director and Scheme Actuary, Isio) for pointing it out.</p>
<p>What does remain genuinely difficult is constructing an <strong>industry-wide total</strong>. The guide covers 32 employers but the profession has many more &mdash; including the Big 4 (PwC, Deloitte, EY, KPMG), several Lloyd&rsquo;s market firms, and specialist insurers, none of which appear in the guide&rsquo;s directory. My research found 11 employers not in the guide. Neither source is complete.</p>
<p><strong>Year-on-year comparison should be possible</strong> using previous editions of the guide, which have been published since 1988/89. I plan to source earlier editions and analyse how graduate intake numbers have changed over time &mdash; particularly whether AI adoption is affecting hiring volumes. That analysis will follow in a separate article.</p>
<hr>
<h2 id="the-ifoa-pipeline-what-the-admissions-data-tells-us">The IFoA pipeline &mdash; what the admissions data tells us</h2>
<p>The IFoA doesn't routinely publish annual student admissions data in an accessible format. Its <a href="https://actuaries.org.uk/about-us/about-our-membership-facts-and-figures/" target="_blank" rel="noopener noreferrer">Facts and Figures</a> page shows total membership (34,531 as at 2024/25, of whom 15,380 are students) but these are stock figures &mdash; how many students exist at a point in time, not how many new students join each year.</p>
<p>However, the IFoA used to publish annual admissions figures in its annual reports, and did so again in its <a href="https://ifoa.foleon.com/annual-report/2023-2024/the-year-in-numbers" target="_blank" rel="noopener noreferrer">2023/24 annual report</a>. Here is the available time series:</p>
<div style="overflow-x: auto;">
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">IFoA year</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">New student admissions</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Source</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2015/16</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,492</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">IFoA Annual Report 2015/16</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2016/17</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,729</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">IFoA Annual Report 2016/17</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2017/18</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">3,557</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">IFoA Annual Report 2017/18</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2018/19</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,791</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">IFoA Annual Report 2018/19</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2019/20 to 2022/23</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not published</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&mdash;</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2023/24</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">3,088</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><a href="https://ifoa.foleon.com/annual-report/2023-2024/the-year-in-numbers" target="_blank" rel="noopener noreferrer">IFoA Annual Report 2023/24</a></td>
</tr>
</tbody>
</table>
</div>
<p>This tells us that approximately <strong>2,500&ndash;3,500 people registered as new IFoA students each year</strong> over the period covered. The 2023/24 figure of 3,088 is within the historical range &mdash; but that figure pre-dates the rapid advances in AI capability during 2024-2026. If AI is changing the volume or nature of graduate actuarial hiring, the effect would show up in 2024/25 and 2025/26 admissions data &mdash; which the IFoA has not yet published.</p>
<p>But new student admissions are not the same thing as UK graduate positions. The IFoA is a global qualification body &mdash; over half of its students are based outside the UK, with large student populations in Ireland, India, and elsewhere. Some of those international students will be working in actuarial roles locally; others may be studying independently.</p>
<p>In the UK, the standard route into the profession is a full-time paid graduate role with an actuarial employer. These are not academic studentships &mdash; they are salaried positions (&pound;28,000&ndash;&pound;38,000 as we've seen) where you work as an actuarial analyst or trainee consultant while studying for IFoA exams alongside the day job. Employers typically provide a study package: paid study leave (a set number of half-days per exam subject, up to an annual maximum), exam fees, tutorial courses, and study materials. Qualifying as a Fellow of the IFoA typically takes around 7 years for those who complete the process &mdash; and roughly half of those who start do not reach Fellowship (based on my own analysis of enriched IFoA qualifier data). This employer-sponsored model is so dominant in the UK that "actuarial student" and "trainee actuary in a paid role" are essentially synonymous.</p>
<p>One statistic underlines how far the IFoA student population is from the "graduate trainee" image. The IFoA's <a href="https://ifoa.foleon.com/annualreport/2024-2025/the-year-in-numbers" target="_blank" rel="noopener noreferrer">2024/25 annual report</a> gives the "average age" of its students as <strong>34.9</strong>. That is a surprisingly high figure for a category that in the UK is dominated by people in their twenties working towards qualification. The IFoA does not define whether this is a mean or median, and does not break it down by region. If it is being driven by a large cohort of older international students &mdash; or by long-standing students who registered years ago and are still on the books &mdash; it would be helpful for the IFoA to explain the composition behind this number.</p>
<p>The 3,088 admissions figure therefore includes a mix of: UK graduates starting these employer-sponsored roles (which is what this article is about), international candidates in equivalent roles abroad, career changers entering the profession mid-career, and some university students registering early to gain exam exemptions. The number of UK graduate actuarial positions in any given year is some fraction of these total admissions, but nobody publishes what that fraction is.</p>
<p>This is a gap worth closing. Actuarial science graduates, career changers, and employers would all benefit from knowing the approximate size of the UK graduate actuarial job market. The IFoA, as the professional body, is best placed to publish this &mdash; ideally with a UK/international breakdown.</p>
<hr>
<h2 id="what-the-picture-tells-us">What the picture tells us</h2>
<p>Even without hard numbers, the qualitative picture is clear:</p>
<p><strong>All major employer categories are hiring.</strong> Big 4 (all four confirmed), consultancies (Aon, WTW, LCP, First Actuarial, Broadstone), insurers (Aviva, L&amp;G, Phoenix, Zurich, Just, Vitality, Beazley), Lloyd's market (Lloyd's of London, Arch Capital), reinsurance (SCOR), banking (Lloyds Banking Group &mdash; probable but unconfirmed for 2026), and public sector (GAD, FCA). But "all the same employers are still running schemes" does not mean they are hiring the same number of people. Cohort sizes could be shrinking &mdash; particularly as AI tools take on more of the routine analytical work that graduate trainees have traditionally done &mdash; and we would have no way of knowing from public data.</p>
<p><strong>Most schemes closed between October 2025 and February 2026.</strong> If you're reading this in April 2026 and haven't yet applied, the main recruitment cycle is over. A few positions remain open on a rolling basis (First Actuarial, LCP, Broadstone, Phoenix/Standard Life, Vitality). The lesson for students: applications for September 2027 schemes will likely open from September 2026.</p>
<p><strong>Starting salaries cluster between &pound;31,000 and &pound;38,000</strong> for most employers, with a clear London premium. Outliers at both ends: Vitality at &pound;28,332 (Bournemouth) and Lloyd's of London at &pound;38,000 (London). If Lloyds Banking Group's &pound;42,000 is confirmed for a 2026 intake, it would be the highest by some margin.</p>
<hr>
<h2 id="methodology-and-sources">Methodology and sources</h2>
<p>This research was conducted on 4 April 2026 using a combination of direct employer career page checks, graduate aggregator searches (Bright Network, Gradcracker, Prospects.ac.uk, StudySmarter, ActuarialCareers.co.uk), and web searches. Salary data comes from either employer-stated figures on career pages or the Hays UK Salary &amp; Recruiting Trends Guide (2024/2025 editions) published via ActuarialCareers.co.uk. IFoA membership data is from the IFoA Annual Report 2024/25; student admissions data is from the IFoA Annual Reports 2015/16 through 2018/19 and the 2023/24 Annual Report. All sources are linked inline.</p>
<p>I have not included employers where I could not independently verify a 2026 scheme from a primary or structured secondary source. Several employers (Mercer, Hymans Robertson, Barnett Waddingham, XPS Pensions) almost certainly run 2026 graduate schemes, but their career pages showed only generic programme descriptions without year-specific confirmation at the time of research.</p>
<p>If your employer runs a graduate actuarial scheme and is not listed here, I would welcome corrections &mdash; please contact me via <a href="https://inqa.group" target="_blank" rel="noopener noreferrer">INQA Group</a>.</p>
<p><strong>Update (6 April 2026):</strong> The primary resource I should have consulted is the <a href="https://www.actuarialcareers.co.uk/bookstore/the-actuarial-profession-guide/" target="_blank" rel="noopener noreferrer">Actuarial Profession Guide 2025/26</a> (37th edition, published by actuarialcareers.co.uk in partnership with the IFoA), which lists 32 employers with graduate intake numbers and locations. I was not aware of this guide when I published the original article.</p>
<hr>
<p><em>Patrick Lee is the founder of <a href="https://inqa.group" target="_blank" rel="noopener noreferrer">INQA Group</a>, a professional community helping actuaries leverage AI and modern tools. He qualified as a Fellow of the Institute of Actuaries in 1990 and worked in actuarial consulting, pensions, and software development before founding INQA Group.</em></p>]]></content:encoded></item><item><title>The Politics Actuary #11: Best Estimate</title><link>https://pjlee.net/blog/the-politics-actuary-11-best-estimate</link><media:content medium="image" url="https://cdn.buttercms.com/tSb79F7lREK3jhsA3s7m" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 01 Apr 2026 00:13:21 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-11-best-estimate</guid><description>The Politics Actuary #11 — from the Assumption Theatre theme. Patrick has budgeted £200 for annual household maintenance. The plumber behind him and the crack in the wall suggest the methodology may have some limitations.</description><content:encoded><![CDATA[<p>Patrick has carefully estimated the annual household maintenance budget at &pound;200. It is not a guess. It is a best estimate. There is a difference, and he will explain it.</p>
<p>The plumber working under the kitchen sink and the crack running up the hallway wall are, of course, short-term noise. The methodology is sound. The fact that it has been wrong every year is not a flaw &mdash; it is a feature. Consistency of approach matters more than consistency with reality.</p>
<p>The Treasury understands this perfectly.</p>
<p><img src="https://cdn.buttercms.com/qhbaxBkMQ22QdWimPNVF" alt="undefined"></p>
<p>The Assumption Theatre series explores the dark art of actuarial assumption-setting &mdash; the pretence of objectivity, the negotiation, and the uncomfortable truth that enormous decisions rest on numbers someone essentially chose. Previous entry: #6 Long-Term Assumption.</p>
<p>Previous cartoons: #1 Record Investment | #2 Y-Axis Trick | #3 Prompt Engineering | #4 Transparency Request | #5 Define Everyone | #6 Long-Term Assumption | #7 Excel Relapse | #8 Holiday Risk Assessment | #9 Confident Nonsense | #10 Nearly There</p>]]></content:encoded></item><item><title>The Politics Actuary #10: Nearly There</title><link>https://pjlee.net/blog/the-politics-actuary-10-nearly-there</link><media:content medium="image" url="https://cdn.buttercms.com/rRAPN9bROilTA1EpIG3A" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 23 Mar 2026 23:07:39 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-10-nearly-there</guid><description>The Politics Actuary #10 — from the Actuarial Pedantry theme. Beth says "nearly there." The sat nav says 14 minutes. Patrick needs to know which definition of "nearly" she's using.</description><content:encoded><![CDATA[<p>Beth says "nearly there." The sat nav says 14 minutes.</p>
<p>For most people, this is a perfectly normal exchange. For Patrick, it's an unresolved ambiguity. Nearly there geographically? Temporally? Or is there some unstated confidence interval he hasn't been briefed on?</p>
<p>The sat nav knows exactly how far it is. Beth knows approximately how far it is. Patrick needs to know which kind of knowing they're doing.</p>
<p><img src="https://cdn.buttercms.com/MjYwr4RnSqWRBKI0dxht" alt="undefined"></p>
<p>The Actuarial Pedantry series explores the domestic consequences of a brain that cannot switch off. Previous entries: #5 Define Everyone.</p>
<p>Previous cartoons: #1 Record Investment | #2 Y-Axis Trick | #3 Prompt Engineering | #4 Transparency Request | #5 Define Everyone | #6 Long-Term Assumption | #7 Excel Relapse | #8 Holiday Risk Assessment | #9 Confident Nonsense</p>]]></content:encoded></item><item><title>The Politics Actuary #9: Confident Nonsense</title><link>https://pjlee.net/blog/the-politics-actuary-9-confident-nonsense</link><media:content medium="image" url="https://cdn.buttercms.com/8OaMRWifQj6zIDe6vugX" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 18 Mar 2026 19:56:50 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-9-confident-nonsense</guid><description>The Politics Actuary #9 — from the AI &amp; the Actuary theme. Introducing Preston, the non-actuary chairman who has never met a black box he didn't like.</description><content:encoded><![CDATA[<p>This cartoon introduces a new character: Preston, the non-actuary chairman.</p>
<p>Every actuary has worked with a Preston. He doesn't understand the methodology, hasn't read the assumptions, and couldn't tell you the difference between a best estimate and a point estimate. But he knows confidence when he sees it. And the AI has confidence in spades.</p>
<p>The actuary, meanwhile, knows that a model proclaiming 99.7% confidence in a &pound;4.2 billion reserve estimate is not a triumph of technology. It is a very expensive way of being wrong with conviction.</p>
<p>Preston is delighted. The actuary is not.</p>
<p><img src="https://cdn.buttercms.com/8mr4aq2UTmbNhkOBGirl" alt="undefined"></p>
<p>Preston will be back. He has a lot of board meetings to attend and a lot of things to enthusiastically misunderstand.</p>
<p>The Politics Actuary is a weekly cartoon series about actuaries, AI, the profession, and the absurdities of overregulation. New characters and themes are introduced as the series develops.</p>
<p>Previous cartoons: #1 Record Investment | #2 Y-Axis Trick | #3 Prompt Engineering | #4 Transparency Request | #5 Define Everyone | #6 Long-Term Assumption | #7 Excel Relapse | #8 Holiday Risk Assessment</p>]]></content:encoded></item><item><title>UK Government Finances: The Big Picture an Actuary Would Want to See</title><link>https://pjlee.net/blog/uk-government-finances-the-big-picture-an-actuary-would-want-to-see</link><media:content medium="image" url="https://cdn.buttercms.com/rIZUK7k2RhSfkB77dW23" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 16 Mar 2026 23:27:42 +0000</pubDate><guid>https://pjlee.net/blog/uk-government-finances-the-big-picture-an-actuary-would-want-to-see</guid><description>An actuarial lens on the UK's Whole of Government Accounts 2023-24: £5 trillion of liabilities, £1.3 trillion of unfunded pensions, and a balance sheet with less margin than ever. Revenue, expenditure, the pension iceberg, PFI, migration, and what it all looks like scaled to a household earning £50,000.</description><content:encoded><![CDATA[<p>The UK government published its latest Whole of Government Accounts in July 2025. It's 318 pages long, consolidates over 10,000 public sector bodies, and &mdash; for the second year running &mdash; the Auditor General refused to sign it off. The National Audit Office disclaimed its opinion entirely: 201 entities didn't submit data, 280 used unaudited figures. The government's own auditor is saying: we can't tell you whether these numbers are right.</p>
<p>That should trouble anyone who reads accounts for a living. And yet these are the most comprehensive financial statements we have for the entire UK public sector. They're the closest thing to a corporate annual report for the country.</p>
<p>I used AI tools to extract and cross-reference data from the 2023-24 WGA, OBR forecasts, and HMRC statistics, then verified the key figures against the original sources. Here's what I think any actuary &mdash; or any numerate taxpayer &mdash; would want to know. This is the first in a series applying actuarial and accounting thinking to public finances. No politics. Just the numbers.</p>
<h3 id="the-covid-shadow">The COVID shadow</h3>
<p>It's impossible to read these accounts without understanding what happened in 2020-21. The government's pandemic response &mdash; furlough, business support loans, NHS surge capacity, Universal Credit uplift, vaccine procurement &mdash; was the largest peacetime fiscal intervention in UK history. Borrowing hit &pound;299bn in a single year (14.8% of GDP). Net debt jumped from around 80% of GDP to over 95%, where it remains. The WGA balance sheet swelled: total liabilities peaked at &pound;6.3 trillion in 2021-22, inflated by pandemic borrowing and ultra-low discount rates on pension obligations.</p>
<p>The 2023-24 WGA captures the aftermath. The emergency spending has ended, but the structural consequences &mdash; higher debt, higher interest costs, expanded welfare claims &mdash; are now embedded in the baseline. The numbers you're about to read are post-COVID numbers. They are the new normal.</p>
<hr>
<h2 id="revenue-three-taxes-fund-two-thirds-of-the-state">Revenue: three taxes fund two-thirds of the state</h2>
<p>Total public services revenue in the year to 31 March 2024 was &pound;1,019.9bn. Of that, &pound;888.8bn was taxation and &pound;131.1bn was other revenue (fees, interest income, NHS charges, rents, and so on).</p>
<p>Here's how the tax breaks down:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Tax</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">% of total</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Income Tax</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">286.2</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">32.2%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">VAT</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">165.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">18.6%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">National Insurance Contributions</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">157.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">17.7%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Corporation Tax</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">89.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">10.1%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Excise Duty</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">33.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">3.8%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Hydrocarbon oils duty</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">24.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2.8%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Council Tax</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">28.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">3.2%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Business rates</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">26.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">3.0%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Stamp taxes</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">16.1</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1.8%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Capital Gains Tax</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">14.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1.6%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Other</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">45.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">5.2%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>888.8</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>100%</strong></td>
</tr>
</tbody>
</table>
<p>The top three taxes &mdash; Income Tax, VAT, and NICs &mdash; brought in &pound;609.3bn. That's 69% of all taxation from just three instruments. Everything else &mdash; corporation tax, council tax, business rates, stamp duty, CGT, fuel duty, excise &mdash; combined produces just 31%.</p>
<p>This concentration matters. It means the Treasury is heavily exposed to the labour market. If employment falls or wage growth stalls, the majority of revenue is directly hit. The OBR's ready reckoners put this in concrete terms: a 1% fall in average earnings would reduce income tax receipts by &pound;3.5bn and NICs by &pound;2.8bn &mdash; a combined &pound;6.3bn hit, roughly the entire annual inheritance tax yield, wiped out by a single percentage point of wage weakness.</p>
<p>Central government collects 94% of all taxation (&pound;834.0bn). Local government collects just 6% (&pound;54.8bn) &mdash; council tax and business rates. The centralisation of UK tax collection is extreme by international standards.</p>
<hr>
<h2 id="the-people-behind-the-numbers">The people behind the numbers</h2>
<p>Before looking at where the money goes, it's worth understanding who's doing what. The UK population (mid-2024, ONS: 69.3 million) breaks down roughly as follows:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Group</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Millions</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">% of total</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Children (0-15)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">~12</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">17%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Working age (16-64)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">~43</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">62%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Pension age (65+)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">~14</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">20%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>69.3</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"></td>
</tr>
</tbody>
</table>
<div style="text-align: center; margin: 24px 0;"><svg viewBox="0 0 520 340" style="max-width: 560px; width: 100%; font-family: 'Segoe UI', Arial, sans-serif;">
  
  
  

  
  <path d="M200,160 L200.0,40.0 A120,120 0 1,1 117.9,247.5 Z" fill="#2563eb"></path>

  
  <path d="M200,160 L117.9,247.5 A120,120 0 0,1 91.4,108.9 Z" fill="#d97706"></path>

  
  <path d="M200,160 L91.4,108.9 A120,120 0 0,1 200.0,40.0 Z" fill="#0d9488"></path>

  
  <text x="267" y="182" text-anchor="middle" font-size="15" font-weight="600" fill="white">Working age</text>
  <text x="267" y="200" text-anchor="middle" font-size="13" fill="white">~43m (62%)</text>

  <text x="129" y="169" text-anchor="middle" font-size="13" font-weight="600" fill="white">65+</text>
  <text x="129" y="185" text-anchor="middle" font-size="12" fill="white">~14m (20%)</text>

  <text x="161" y="93" text-anchor="middle" font-size="13" font-weight="600" fill="white">0-15</text>
  <text x="161" y="109" text-anchor="middle" font-size="12" fill="white">~12m (17%)</text>

  
  <rect x="355" y="110" width="16" height="16" rx="3" fill="#2563eb"></rect>
  <text x="378" y="123" font-size="13" fill="#333">Working age (16-64)</text>

  <rect x="355" y="138" width="16" height="16" rx="3" fill="#d97706"></rect>
  <text x="378" y="151" font-size="13" fill="#333">Pension age (65+)</text>

  <rect x="355" y="166" width="16" height="16" rx="3" fill="#0d9488"></rect>
  <text x="378" y="179" font-size="13" fill="#333">Children (0-15)</text>

  
  <text x="260" y="320" text-anchor="middle" font-size="13" fill="#666">UK population: 69.3 million (ONS mid-2024)</text>
</svg></div>
<p>Of the 43 million working-age adults, 34.2 million are in employment (2025) and 9.4 million are economically inactive &mdash; not in work and not looking for work. Against the working population, 13.1 million people receive the state pension. In total, 24 million people claim at least one DWP benefit, though many of those are also employed (Universal Credit, for example, tops up low wages).</p>
<p>The ONS breaks down the reasons for working-age inactivity, and the time series tells a striking story:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Year</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Long-term sick (000s)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Students (000s)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Looking after family (000s, F)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Retired early (000s)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Total inactive (000s)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2010</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,226</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,274</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,126</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,540</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9,446</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2015</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,074</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,306</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,022</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,228</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9,037</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2019</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,046</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,295</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,782</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,116</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">8,644</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2024</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,802</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,511</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,438</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,083</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9,378</td>
</tr>
</tbody>
</table>
<p>Long-term sickness has risen from 2.0 million to 2.8 million since 2019 &mdash; a 37% increase. It is now the single largest reason for working-age economic inactivity, overtaking students. This is the biggest structural shift in the post-COVID labour market, and it feeds directly into disability benefit costs (projected to rise from &pound;39bn to &pound;58bn by 2028-29).</p>
<p>Two other trends are worth noting. The number of women inactive due to looking after family has nearly halved since 1993 (from 2.9 million to 1.4 million) &mdash; a massive structural shift as more women entered the workforce. And early retirement among the working-age population peaked at 1.56 million in 2011 but has since fallen to 1.03 million, driven by the increase in state pension age from 60 to 66 for women and 65 to 66 for men.</p>
<p>The dependency arithmetic is simple: 13.1 million state pensioners supported by 34.2 million workers gives a ratio of roughly one pensioner for every 2.6 workers. That ratio will worsen as the baby boomer cohort retires and working-age population growth slows.</p>
<h3 id="the-migration-variable">The migration variable</h3>
<p>Net migration is the single biggest swing factor in this picture. It peaked at 944,000 in the year to March 2023 &mdash; driven by post-COVID catch-up, Ukraine and Hong Kong schemes, and a surge in health and care worker visas. It has since fallen sharply to 204,000 in the year to June 2025, back to roughly pre-pandemic levels.</p>
<p>The OBR's fiscal forecasts are highly sensitive to these numbers. In its March 2026 outlook, the OBR estimates that each year's net migrants contribute around &pound;19,500 per person in tax revenue. Over its five-year forecast, the central migration assumption (settling at around 315,000 per year) adds &pound;6.2bn to annual tax receipts by 2028-29 and reduces borrowing by &pound;7.4bn. A swing of 200,000 per year in either direction would change borrowing by &pound;13-20bn &mdash; comparable to the entire annual budget of some government departments.</p>
<p>The fiscal impact depends heavily on who is migrating. The OBR's average figure of &pound;19,500 per migrant in tax revenue reflects a mix of high-earning professionals, students, care workers, dependants, and refugees &mdash; groups with very different fiscal profiles. A migrant arriving at age 25 and earning UK average wages until retirement would contribute a net &pound;341,000 over their lifetime, according to OBR modelling. But that is an idealised scenario. Research from the Migration Observatory at Oxford shows that EEA migrants have historically made a positive net fiscal contribution, while non-EEA migrants &mdash; who now dominate UK immigration flows &mdash; tend to have a smaller or negative fiscal impact on average, largely because of lower average earnings and higher use of public services including education for dependant children.</p>
<p>The post-2020 surge was heavily non-EEA: students, health and care workers (many on relatively low salaries), dependants, and asylum seekers. Two specific humanitarian schemes account for a significant share: around 210,000 Ukrainians arrived under the Ukraine visa schemes by mid-2024, and approximately 163,000 Hong Kongers arrived under the BN(O) visa route by March 2025. These are distinct from the broader asylum system, where not all claims are upheld &mdash; the initial grant rate for asylum claims was 67% in 2023 but fell to 47% in 2024 under the higher standard of proof required by the Nationality and Borders Act, meaning that roughly half of claimants are not granted protection. None of the ONS net migration figures above include illegal immigration. The most visible route &mdash; small boat Channel crossings &mdash; totalled around 29,000 in 2023 and 37,000 in 2024, but this is only part of the picture. Others enter clandestinely via lorries and trains, or arrive legally and overstay their visas. The government does not publish an estimate of the total unauthorised population. Academic estimates from 2017 &mdash; before the small boat crossings proliferated &mdash; put it at 700,000 to 1.2 million (Pew Research Centre). Since then, around 175,000 unauthorised arrivals were recorded between 2020 and September 2024 alone, and roughly 85,000 refused asylum seekers from 2010-2023 have not been recorded as having left the UK. A reasonable current estimate of the total unauthorised population is probably somewhere above one million, though the true figure is inherently uncertain. This composition is likely less fiscally positive than the OBR's blended average implies. And the fiscal benefit of any cohort erodes over time as migrants settle, bring family, and eventually retire &mdash; at which point they draw on the same pensions and health services as everyone else. If public services spending adjusts to reflect a larger population (more school places, GP appointments, housing), the OBR estimates this would cost an additional &pound;6-8bn &mdash; partially offsetting the tax gains.</p>
<p>The political direction is towards lower migration &mdash; higher salary thresholds, tighter visa rules, and a stated aim to reduce dependence on overseas workers. For the fiscal arithmetic, this creates a genuine tension: fewer working-age taxpayers entering the system at precisely the point when the baby boomer retirement wave is accelerating, but also potentially lower pressure on public services and housing. The net effect depends on whether the migrants who do come are higher-earning (as the salary threshold policy intends) or whether total numbers fall faster than average quality rises.</p>
<hr>
<h2 id="expenditure-the-two-elephants-in-the-room">Expenditure: the two elephants in the room</h2>
<p>Total expenditure on public services in the year to 31 March 2024 was &pound;1,076.3bn, giving a net operating deficit of &pound;56.4bn. Here's where it went:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Category</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">% of total</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Social security benefits</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">311.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">28.9%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Purchase of goods and services (see below)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">263.7</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">24.5%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Staff costs</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">240.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">22.3%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Grants and subsidies</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">104.1</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9.7%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Depreciation and impairment</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">64.2</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">6.0%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Interest on government borrowing</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">63.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">5.9%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Increase in provisions</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">29.0</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2.7%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>1,076.3</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>100%</strong></td>
</tr>
</tbody>
</table>
<p>Social security benefits (&pound;311.4bn) deserve a closer look, because this is where the real money is:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Benefit</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">%</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">State pension</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">127.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">40.9%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Universal Credit</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">53.1</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">17.1%*</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Personal Independence Payment</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">23.2</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">7.5%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Tax credits</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">19.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">6.2%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Employment and Support Allowance</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">13.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">4.3%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Child Benefit</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">12.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">4.0%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Housing Benefit</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">11.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">3.8%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Pension credit</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">5.7</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1.8%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">All other benefits</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">45.0</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">14.4%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>311.4</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>100%</strong></td>
</tr>
</tbody>
</table>
<p>*Universal Credit spiked to &pound;80.4bn in 2020-21 at the height of the pandemic (temporary uplift + mass unemployment claims) before falling back and then rising again as legacy benefits migrate onto UC. The current &pound;53.1bn reflects UC's growing share &mdash; 63% of combined UC and legacy benefit spending &mdash; as legacy benefits are wound down. By 2028-29, the OBR forecasts UC alone will reach &pound;88.1bn.</p>
<p>The state pension alone &mdash; &pound;127.3bn &mdash; is larger than the entire defence budget. Pensioner benefits collectively (including pension credit) total &pound;133.0bn, or 43% of all social security spending. Working-age and disability benefits account for the other 57%.</p>
<p>The purchase of goods and services figure (&pound;263.7bn) is worth unpacking, because at first glance it's surprising that it exceeds staff costs. This is the government's total non-staff operational spending &mdash; drugs and medical supplies, IT services, outsourced clinical and support services, equipment, maintenance, consumables, rent, utilities, and contracted-out services. The WGA Note 8 breakdown by department shows where it goes:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Department</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Health and Social Care</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">93.3</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Ministry of Defence</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">25.0</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Scottish Government</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">11.2</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Academy schools</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9.2</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Department for Transport</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9.1</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Home Office</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">7.4</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Local government</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">66.8</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Other</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">41.7</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>263.7</strong></td>
</tr>
</tbody>
</table>
<p>Health dominates &mdash; the DHSC spent &pound;93.3bn on procurement alone, more than Defence, Scottish Government, and academies combined. This reflects the NHS's enormous outsourcing footprint: agency staff (classified as procurement, not staff costs), pharmaceutical purchases, PFI service charges, and contracted clinical services.</p>
<p>When you combine the functional spending view (from HM Treasury's COFOG classification), the picture is even starker:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Function</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">%</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Social protection</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">378.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">33%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Health</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">230.2</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">20%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Education</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">118.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">10%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">General public services</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">169.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">15%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Everything else</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">259.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">22%</td>
</tr>
</tbody>
</table>
<p>Social protection and health together account for 53% of all government spending. These are the two elephants. Everything else the government does &mdash; defence, policing, courts, transport, housing, environment, culture &mdash; fits in the remaining 47%.</p>
<hr>
<h2 id="the-balance-sheet-5-trillion-of-liabilities">The balance sheet: &pound;5 trillion of liabilities</h2>
<p>The WGA consolidates a full accruals-based balance sheet as at 31 March 2024 &mdash; something the headline fiscal statistics (debt-to-GDP, borrowing) don't capture. This is where it gets interesting for actuaries.</p>
<p><img src="https://cdn.buttercms.com/0qnb1o5cTuu0vFAHEw7m" alt="undefined"></p>
<h3 id="assets-26513bn-31-march-2024">Assets: &pound;2,651.3bn (31 March 2024)</h3>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Asset</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Property, plant and equipment</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,539.1</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Financial assets (non-current)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">470.0</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Financial assets (current)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">237.6</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Trade and other receivables</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">239.1</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Intangible assets</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">52.1</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Cash</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">39.5</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Other (right-of-use, gold, inventories etc.)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">73.9</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>2,651.3</strong></td>
</tr>
</tbody>
</table>
<p>PP&amp;E dominates &mdash; &pound;1.5 trillion of roads, hospitals, schools, military equipment, social housing. Most of it is illiquid and non-tradeable. The government couldn't sell the M1 to plug a budget gap.</p>
<p>The gold holdings (&pound;17.5bn) are a footnote &mdash; a reminder of Gordon Brown's sale of 395 tonnes at prices between $256 and $296 per ounce. At March 2024 prices (~$2,200/oz), the remaining 310 tonnes are worth roughly &pound;17.5bn. The 395 tonnes sold would today be worth approximately &pound;22bn.</p>
<h3 id="liabilities-50245bn-31-march-2024">Liabilities: &pound;5,024.5bn (31 March 2024)</h3>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Liability</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Government borrowings (gilts, NS&amp;I, T-bills)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,020.0</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Net pension liabilities</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,311.9</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Other financial liabilities</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,202.1</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Provisions</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">262.2</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Trade and other payables</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">228.3</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>5,024.5</strong></td>
</tr>
</tbody>
</table>
<p><strong>Net liabilities: &pound;2,373.2bn</strong> &mdash; roughly &pound;34,900 per person in the UK.</p>
<p>Government borrowings (&pound;2,020.0bn) and pensions (&pound;1,311.9bn) together are &pound;3,331.9bn &mdash; two-thirds of all liabilities. The borrowings comprise gilts (&pound;1,703.4bn carrying amount, split between &pound;1,613.0bn non-current and &pound;90.4bn current), NS&amp;I products (&pound;230.5bn), and Treasury bills (&pound;86.1bn).</p>
<p>An accountant would note the fair value gap on the gilts: fair value is &pound;1,463.1bn versus the carrying amount (book value) of &pound;1,703.4bn. Fair value here is essentially market value &mdash; what the gilts would trade for in the open market given current yields. The book value is the amortised cost &mdash; roughly the face value the government must ultimately repay. The &pound;240bn difference reflects above-market coupon rates on older issuances &mdash; the government is paying more interest than it would on today's borrowings, but the face value obligation remains.</p>
<h3 id="provisions-2622bn">Provisions: &pound;262.2bn</h3>
<p>The provisions note is where the long-tail liabilities live &mdash; and this is directly actuarial territory:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Provision</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Nuclear decommissioning</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">106.9</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Clinical negligence (England)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">58.2</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Pension Protection Fund</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">19.1</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">EU liabilities</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">10.6</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">MOD nuclear</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9.0</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Nuclear Liabilities Fund</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">9.6</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Oil &amp; gas decommissioning</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">5.7</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Clinical negligence (Scotland + Wales)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2.9</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>262.2</strong></td>
</tr>
</tbody>
</table>
<p>Nuclear decommissioning (&pound;106.9bn) is one of the longest-tail liabilities in existence &mdash; stretching decades into the future, with cost estimates sensitive to discount rates, technology assumptions, and real cost inflation. Clinical negligence (&pound;61.1bn across the UK) is growing rapidly and represents the NHS's hidden balance sheet problem.</p>
<h3 id="the-pfi-legacy">The PFI legacy</h3>
<p>Then there's PFI &mdash; the Private Finance Initiative. Between the 1990s and 2018, the government used PFI to build hospitals, schools, prisons, and roads using private sector capital. The idea was simple: the private sector builds and maintains the asset, the government pays an annual "unitary charge" over 25-30 years, and the risk sits with the contractor. The programme was discontinued in 2018, but 665 contracts are still running, with the last ones not expiring until 2048.</p>
<p>The WGA puts these on the balance sheet (Note 28). The net book value of PFI assets is &pound;68.9bn. The corresponding liability &mdash; the present value of future capital repayments &mdash; is &pound;35.9bn. But that's only the capital element. The total future commitments break down as follows:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Future PFI obligations</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">&pound;bn</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Finance lease (capital + interest)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">55.3</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Annual service charges</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">58.1</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total future PFI commitments</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>113.4</strong></td>
</tr>
</tbody>
</table>
<p>HM Treasury's own 2024 summary data puts it slightly differently: &pound;136bn in remaining unitary charge payments across the 665 projects, against a capital value of around &pound;50bn.</p>
<p>The NAO's 2018 analysis was blunter. It found that PFI financing was around 40% more expensive than government borrowing for the same assets. Across the entire PFI portfolio, total lifetime repayments were estimated at roughly &pound;300bn &mdash; for assets with a capital value of &pound;57bn. That's a multiplier of over 5x.</p>
<p>The NHS is the most exposed. The Department of Health and Social Care holds &pound;17.3bn of PFI finance obligations and &pound;20.2bn of future service charges. There are 121 hospital PFI projects in England alone, with a combined capital cost of &pound;11.6bn and estimated total repayments of &pound;79.3bn. Individual cases are striking: Barts Health NHS Trust in London has a 43-year PFI contract for buildings worth approximately &pound;1.1bn, with total repayments exceeding &pound;7bn.</p>
<p>What makes PFI particularly interesting from an accounting perspective is the gap between how it appears in different sets of government accounts. In the WGA &mdash; which follows IFRS &mdash; most PFI assets and liabilities are on the balance sheet, because the government is deemed to control the asset. In the National Accounts &mdash; which politicians and the media cite &mdash; most PFI is off the balance sheet, because the private sector bears the risks and rewards. The WGA reconciliation shows &pound;31bn of PFI contracts that appear in WGA but not in the headline public sector net financial liabilities. When politicians talk about "the national debt," they're using the number that excludes most of this.</p>
<p>140 of the 665 projects expire before 2030. The Infrastructure and Projects Authority recommends starting to plan for contract expiry at least seven years in advance. Many are already inside that window.</p>
<hr>
<h2 id="the-pension-iceberg">The pension iceberg</h2>
<p>This is the section I find most interesting as an actuary. The WGA breaks down public sector pension liabilities by scheme (as at 31 March 2024), and the numbers are enormous:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Scheme</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Net liability (&pound;bn)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Change from 31 Mar 2023</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">NHS</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">500.8</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">-6.4%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Teachers</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">307.8</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">-8.0%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Civil Service</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">208.1</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">-6.0%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Armed Forces</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">144.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">-7.6%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Police</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">93.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">-9.8%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Royal Mail (pre-privatisation)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">28.7</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">-4.0%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Fire</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">17.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">-22.1%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Other unfunded</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">14.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">0.0%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total unfunded</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>1,315.9</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>-7.2%</strong></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">LGPS (funded &mdash; 98 funds)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">(2.8)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&mdash;</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Other funded</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">(1.2)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&mdash;</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Grand total (net)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>1,311.9</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>-7.3%</strong></td>
</tr>
</tbody>
</table>
<p>These are almost entirely unfunded defined benefit <em>occupational</em> pensions &mdash; entirely separate from the state pension (which costs &pound;127.3bn and appears in the social security benefits line above). There are no invested assets backing these schemes. Current employees and employers make contributions, current pensioners receive payments, and the gap is plugged by taxation. In 2023-24, total contributions to these unfunded schemes were &pound;49.9bn and payments to pensioners were &pound;55.0bn &mdash; a &pound;5.1bn annual shortfall that taxpayers cover. (The WGA is published annually, typically 15 months after the year-end. The 2024-25 figures &mdash; as at 31 March 2025 &mdash; would be expected around mid-to-late 2026.)</p>
<p>The four largest schemes &mdash; NHS, Teachers, Civil Service, and Armed Forces &mdash; account for &pound;1,161.3bn, or 88% of the total unfunded liability.</p>
<h3 id="the-discount-rate-illusion">The discount rate illusion</h3>
<p>Anyone who has worked with IAS 19 disclosures will immediately recognise what happened here. In my <a href="https://inqa.group/actuaries/patrick-lee-inqa-com/!/24/ias19-hedge-ratios-12-ftse-companies" target="_blank" rel="noopener noreferrer">previous analysis of 12 FTSE companies' pension disclosures</a>, the same dynamic played out at corporate level &mdash; but the government version is 100x larger.</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Year (31 March)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Discount rate</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Net pension liabilities (&pound;bn)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2022</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">~1.5%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,639</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2023</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">4.15%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,415</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2024</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">5.10%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,312</td>
</tr>
</tbody>
</table>
<p>Between 2022 and 2024, pension liabilities fell by &pound;1,327bn &mdash; more than half. But the underlying pension promises are identical. No pensions were cut. No retirement ages were raised. No benefits were reduced. The only thing that changed was the discount rate used to value them.</p>
<p>A 3.6 percentage point rise in gilt yields halved the present value of future pension payments. If yields were to fall back to 2022 levels &mdash; which is not impossible in a recession &mdash; the liabilities would balloon back towards &pound;2.6 trillion.</p>
<p>This is the single most important thing an actuary can explain about public finances: the numbers that politicians and commentators cite are extraordinarily sensitive to a single market variable that nobody controls and nobody can predict.</p>
<p>For unfunded government pensions, the real cash cost each year is what matters &mdash; contributions in versus pensions out. The present value is an accounting number. But that accounting number is what drives the WGA balance sheet, and it's what the headlines report. So when the Treasury points to "improving" net liabilities, it's worth asking: did anything actually change, or did the discount rate do the work?</p>
<hr>
<h2 id="the-trend-15-years-of-wga-data">The trend: 15 years of WGA data</h2>
<p>The WGA has been published annually since 2009-10, giving us a 15-year picture:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Year</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Total assets (&pound;bn)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Total liabilities (&pound;bn)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Net liabilities (&pound;bn)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Net pensions (&pound;bn)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2009-10</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,207.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,419.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">~1,212</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,132</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2016-17</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,903.0</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">4,323.7</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">~2,421</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,835</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2021-22</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,414.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">6,289.2</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">3,874.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,639</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2022-23</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,554.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">4,943.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,389.1</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,415</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">2023-24</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,651.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">5,024.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,373.2</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,312</td>
</tr>
</tbody>
</table>
<p>Total assets have more than doubled (&pound;1,208bn to &pound;2,651bn). But liabilities have also more than doubled (&pound;2,419bn to &pound;5,025bn). The gap has roughly doubled too &mdash; from ~&pound;1.2 trillion to ~&pound;2.4 trillion.</p>
<p>The 2021-22 peak of &pound;3.9 trillion in net liabilities was the combined effect of two forces: pandemic-era borrowing (which pushed government debt sharply higher) and ultra-low interest rates (which inflated pension liabilities to &pound;2.6 trillion at a discount rate of ~1.5%). The subsequent "improvement" to &pound;2.4 trillion was driven almost entirely by the discount rate rise &mdash; not by any reduction in spending commitments. Strip out the pension remeasurement, and the underlying fiscal position deteriorated: government borrowings rose from &pound;1,754bn to &pound;2,020bn between 2022-23 and 2023-24 alone, as the pandemic-era debt was rolled over at higher interest rates.</p>
<hr>
<h2 id="whats-coming-next">What's coming next</h2>
<p>The OBR's March 2026 Economic and Fiscal Outlook projects borrowing of &pound;133bn in 2025-26, falling to &pound;59bn by 2030-31. Net debt is expected to peak at 96.5% of GDP in 2028-29 before stabilising.</p>
<p>But some of the spending pressures are baked in. The state pension triple lock guarantees minimum annual increases of 2.5%, earnings growth, or CPI &mdash; whichever is highest. State pension spending is already &pound;127.3bn and growing faster than revenue. Disability benefits are projected to rise from &pound;39bn to &pound;58bn in five years. Debt interest &mdash; &pound;63.4bn in the WGA, but forecast at &pound;114bn for 2025-26 by the OBR &mdash; is now larger than the defence budget and growing. Much of this is the direct cost of pandemic borrowing: gilts issued at low yields in 2020-21 are being refinanced at rates two to three times higher, and index-linked gilts &mdash; roughly a quarter of the stock &mdash; amplified the cost when inflation surged in 2022-23.</p>
<p>Meanwhile, the personal allowance has been frozen at &pound;12,570 since 2021-22 and won't rise until at least April 2031. A decade of fiscal drag, pulling millions of low earners into the tax base and pushing middle earners into higher bands. It's a stealth tax that compounds silently &mdash; and it's the government's main mechanism for closing the gap.</p>
<p>The tax-to-GDP ratio is forecast to reach 38% by 2030-31 &mdash; a post-war high.</p>
<hr>
<h2 id="if-this-were-a-household">If this were a household</h2>
<p>Economists will tell you that a government is not a household. A household can't raise taxes, print its own currency, or live forever. All true. But the household analogy is useful as a stress test &mdash; not because the government <em>is</em> a household, but because the traditional reasons why it doesn't have to behave like one are becoming less convincing.</p>
<p>Let's scale it down. The UK government's finances in 2023-24, expressed as a household earning &pound;50,000 a year:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Government (&pound;bn)</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: right; font-weight: 600;">Household equivalent (&pound;)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Income</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,019.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;50,000</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Spending</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,076.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;52,770</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Annual shortfall</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">56.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;2,770</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Outstanding debt</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,020.0</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;99,030</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Unfunded pension promises</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,311.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;64,310</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Other liabilities (provisions, payables, etc.)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">1,692.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;82,970</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total liabilities</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>5,024.5</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;246,310</strong></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Assets (mostly the house)</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">2,651.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;129,970</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Net debt</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>2,373.2</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;"><strong>&pound;116,340</strong></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;">Annual interest payments</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">63.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; text-align: right; font-variant-numeric: tabular-nums;">&pound;3,110</td>
</tr>
</tbody>
</table>
<p>In terms a mortgage adviser would understand:</p>
<ul>
<li>
<p><strong>The mortgage</strong> (gilts &mdash; &pound;99,000): A mortgage of roughly 2x income &mdash; modest by UK standards, where many households borrow 4-5x income. On its own, this would be very manageable. But here's what makes it unusual: the mortgage is less than half of this household's total liabilities. Most households have a mortgage and not much else. This one has a mortgage <em>and</em> a pension gap, <em>and</em> an overdraft, <em>and</em> repair bills, <em>and</em> a hire purchase contract. And it's adding to the mortgage every year &mdash; borrowing another &pound;2,770 annually just to cover day-to-day expenses, which is like putting the weekly shop on the mortgage.</p>
</li>
<li>
<p><strong>The pension gap</strong> (unfunded schemes &mdash; &pound;64,000): This household has promised itself a defined benefit pension but has put nothing aside to pay for it. It's as if you'd committed to paying yourself &pound;2,700 a year in retirement, relying entirely on your children to cover it when the time comes. And the time is already here &mdash; the payments have started and contributions don't quite cover them.</p>
</li>
<li>
<p><strong>The other debts</strong> (other financial liabilities, provisions, payables &mdash; &pound;83,000): This is a mix. The largest chunk (&pound;59,000) is like an enormous overdraft facility that the household arranged during a crisis and hasn't unwound &mdash; the equivalent of the Bank of England's QE reserves sitting on the balance sheet. Buried within that overdraft is a hire purchase agreement (PFI: &pound;1,800 on the balance sheet, but &pound;5,600 in total future payments) where you're paying five times the asset's value over 25 years and can't get out of the contract. Then there's &pound;13,000 of known future repair bills &mdash; the roof needs replacing (nuclear decommissioning: &pound;107bn), there's a growing legal claim from a neighbour (clinical negligence: &pound;61bn), and various other commitments that can't be avoided. And &pound;11,000 in unpaid bills sitting on the kitchen table.</p>
</li>
<li>
<p><strong>The interest bill</strong> (&pound;3,110 a year): That's 6.2% of income going on servicing debt &mdash; more than half what the household spends on its children's education (&pound;5,800). And it's rising &mdash; the old fixed-rate deals are expiring and being replaced at rates two to three times higher. The OBR forecasts this rising to over &pound;5,600 by 2025-26.</p>
</li>
<li>
<p><strong>The house</strong> (assets &mdash; &pound;130,000): Mostly property, roads, and equipment. Theoretically worth &pound;130,000, but almost none of it can be sold. You can't liquidate a hospital or auction off the M1 to pay down debt.</p>
</li>
</ul>
<p>Add it all up and this household has &pound;246,000 in liabilities against &pound;130,000 in unsellable assets, is spending more than it earns every month, and has no realistic plan to pay down the balance. A financial adviser would call this unsustainable. The traditional response is that governments have three escape routes that households don't:</p>
<p><strong>1. Raise taxes.</strong> But the tax-to-GDP ratio is already heading for a post-war high of 38%. The personal allowance has been frozen for a decade. National Insurance was raised in 2022 and employer NICs again in 2025. At some point, higher taxes reduce economic activity and the revenue gains diminish &mdash; the Laffer curve is real even if nobody agrees where the peak is. Capital and talent are more mobile than ever: raise corporation tax too far and investment moves; raise personal tax too far and high earners relocate. The headroom is shrinking.</p>
<p><strong>2. Print money (monetary financing).</strong> The Bank of England effectively did this during COVID through quantitative easing &mdash; buying &pound;450bn of gilts with newly created reserves. The 2022-23 inflation surge was primarily driven by energy prices (Russia's invasion of Ukraine sent gas prices soaring) and global supply chain disruptions, but QE created the inflationary backdrop: an economy flooded with liquidity was far more susceptible to price shocks when they arrived. The combined result &mdash; CPI hitting 11.1% in October 2022 &mdash; eroded real wages, inflated index-linked gilt costs, and forced emergency rate rises. The lesson is fresh: monetary financing may not directly cause inflation, but it removes the buffer that would have contained it. Whether that lesson prevents it being used again is another matter &mdash; governments under fiscal pressure have historically found reasons to revisit tools they once swore off.</p>
<p><strong>3. Grow your way out.</strong> This is the only genuinely sustainable route &mdash; if real GDP growth exceeds the real interest rate on government debt, the debt-to-GDP ratio falls naturally over time. But the OBR's central forecast is for real growth of 1.1-1.6% per year through 2030. Gilt yields are around 4.5%. The arithmetic only works if growth accelerates substantially or yields fall back &mdash; neither of which is guaranteed.</p>
<p>There is a fourth factor that rarely features in these discussions: <strong>AI and automation</strong>. If AI delivers even a fraction of its projected productivity gains, it could transform the fiscal equation &mdash; higher output per worker, new industries, expanded tax base. But it could equally hollow out the traditional employment model that generates 69% of all tax revenue (income tax + NICs + VAT on consumption). If millions of jobs are automated faster than new ones are created, the government faces lower tax receipts and higher welfare costs simultaneously. Nobody knows which effect will dominate, but the risk is asymmetric: the upside accrues gradually over decades, while the labour market disruption could arrive in years.</p>
<p>The honest assessment is this: the UK's fiscal position is not yet a crisis, but the margin of safety has narrowed dramatically. Government debt is 198% of annual revenue &mdash; nearly two years' income. Interest costs consumed 6.2% of revenue in 2023-24, and the OBR forecasts this rising to over 11% by 2025-26 as pandemic-era gilts are refinanced at higher rates. The major spending categories &mdash; pensions, health, disability &mdash; are all structurally growing faster than revenue. Every traditional fiscal lever has already been partially used. And the next recession &mdash; whenever it comes &mdash; will hit a balance sheet with far less capacity to absorb the shock than in 2008 or 2020.</p>
<p>A household in this position would be told to cut spending, increase income, or both &mdash; urgently. A government has more tools, but fewer than it used to, and the cost of each tool is higher than it was a decade ago.</p>
<hr>
<h2 id="why-this-matters-for-actuaries">Why this matters for actuaries</h2>
<p>Actuaries value long-term liabilities for a living. We understand that a discount rate is not a magic wand &mdash; it changes the present value, not the cash flows. We know that unfunded promises are real obligations even when they don't appear on a conventional balance sheet. We're trained to stress-test assumptions and ask what happens when they're wrong.</p>
<p>The WGA is the single most actuarially relevant document the UK government publishes, and almost nobody reads it. Not politicians, not journalists, and &mdash; based on the NAO's audit disclaimer &mdash; not even all the public bodies that are supposed to contribute to it.</p>
<p>In the next post in this series, I'll go deeper into the pension liabilities &mdash; how the six unfunded schemes compare, what the cash flow projections look like, and what longevity risk means when there's no corporate sponsor and the bill falls directly on future taxpayers.</p>
<hr>
<p><em>All figures in this post are from the Whole of Government Accounts 2023-24 (HC 917, published 17 July 2025), the OBR March 2026 Economic and Fiscal Outlook, and OBR tax-by-tax spend-by-spend briefings. The WGA received a disclaimed audit opinion from the Comptroller and Auditor General for the second consecutive year. Full source links are available on request.</em></p>
<p><em>Patrick Lee is the founder of INQA Group. He is a qualified actuary &mdash; MA FIA (1990 to Sep 2020) Dip Stats &mdash; and a software architect.</em></p>]]></content:encoded></item><item><title>The Politics Actuary #8: Holiday Risk Assessment</title><link>https://pjlee.net/blog/the-politics-actuary-8-holiday-risk-assessment</link><media:content medium="image" url="https://cdn.buttercms.com/rzqFKo1DSUiSVklIlmYs" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 14 Mar 2026 18:49:24 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-8-holiday-risk-assessment</guid><description>The Politics Actuary #8 — from the Actuaries in the Wild theme. Some people browse TripAdvisor. Patrick builds a risk matrix.</description><content:encoded><![CDATA[<p>This is the first cartoon from the Actuaries in the Wild theme &mdash; actuaries applying professional thinking to absurd everyday situations.</p>
<p>Most people book a holiday by scrolling through TripAdvisor and picking somewhere with a pool. An actuary builds a risk matrix, plots "lost passport" and "Lily's phone falls in pool" by likelihood and impact, and concludes that Greece has an unacceptable risk profile.</p>
<p>The family's complete lack of surprise is the real punchline. Beth has been through this before. She already knows they're going to Greece &mdash; she just has to wait for Patrick to exhaust his analysis first.</p>
<p><img src="https://cdn.buttercms.com/6wZ2N3akTBecHTWQENkl" alt="undefined"></p>
<p>The Politics Actuary is a weekly cartoon series about actuaries, AI, the profession, and the absurdities of overregulation. It follows a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile.</p>
<p>Any resemblance to real actuaries is entirely intentional.</p>
<p>Previous cartoons: #1 Record Investment | #2 Y-Axis Trick | #3 Prompt Engineering | #4 Transparency Request | #5 Define Everyone | #6 Long-Term Assumption | #7 Excel Relapse</p>]]></content:encoded></item><item><title>The Politics Actuary #7: Excel Relapse</title><link>https://pjlee.net/blog/the-politics-actuary-7-excel-relapse</link><media:content medium="image" url="https://cdn.buttercms.com/2gHfOdaRfiPCiHzfEBTm" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 10 Mar 2026 22:33:13 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-7-excel-relapse</guid><description>The Politics Actuary #7 — from the AI &amp; the Actuary theme. Management wanted AI-first. Not everyone got the memo.</description><content:encoded><![CDATA[<p>This is the second cartoon from the AI &amp; the Actuary theme &mdash; the collision between AI and actuarial work.</p>
<p>Every firm has announced its AI strategy. Every team has someone who has "started using AI." And somewhere, in every office, someone is quietly doing the whole thing in Excel first and then asking AI if it agrees &mdash; just so they can tick the box.</p>
<p>The profession's attachment to spreadsheets is not a weakness. It is a survival instinct honed over decades of being told that the new tool will change everything, only to discover that it crashes on the edge case your Excel sheet handled in 2014.</p>
<p><img src="https://cdn.buttercms.com/7iII8fhJQDadWkBDN109" alt="undefined"></p>
<p>The Politics Actuary is a weekly cartoon series about actuaries, AI, the profession, and the absurdities of overregulation. It follows a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile.</p>
<p>Any resemblance to real actuaries is entirely intentional.</p>
<p>Previous cartoons: #1 Record Investment | #2 Y-Axis Trick | #3 Prompt Engineering | #4 Transparency Request | #5 Define Everyone | #6 Long-Term Assumption</p>]]></content:encoded></item><item><title>Discount Rates Tripled. Liabilities Halved. So Why Are Some Schemes Still In Deficit?</title><link>https://pjlee.net/blog/discount-rates-tripled-liabilities-halved-so-why-are-some-schemes-still-in-deficit</link><media:content medium="image" url="https://cdn.buttercms.com/vl6yPVXMSxy7qhP8w6E1" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 09 Mar 2026 21:00:40 +0000</pubDate><guid>https://pjlee.net/blog/discount-rates-tripled-liabilities-halved-so-why-are-some-schemes-still-in-deficit</guid><description>I expanded my IAS 19 analysis to 12 FTSE companies and derived a metric from public OCI data that reveals how well each scheme's assets track its liabilities: the hedge ratio. Five companies show ratios above 100%, consistent with leveraged LDI. Investment strategies have shifted dramatically since the 2022 gilt crisis — and the disclosure gap around leverage is a problem.</description><content:encoded><![CDATA[<p>In 2021, BT's pension obligation was &pound;60bn. Today, it's &pound;37bn &mdash; a &pound;23bn reduction. Yet its deficit only improved from &pound;5.1bn to &pound;4.1bn. How did a 38% fall in liabilities translate into just a 20% improvement in the deficit?</p>
<p>In my <a href="https://pjlee.net/blog/i-used-ai-to-compare-pension-disclosures-across-4-ftse-companies-heres-what-i-found" target="_blank" rel="follow noopener">first post</a>, I used AI to extract and compare IAS 19 pension disclosures from four FTSE companies &mdash; BT, BAE Systems, Tesco, and BP. That was a snapshot: one year, four companies, a proof of concept.</p>
<p>This time I've gone deeper. I expanded to 12 FTSE companies and built time series going back up to five years &mdash; capturing the full before-and-after of the 2022 gilt yield crisis. The headline numbers are dramatic: UK discount rates roughly tripled (from ~1.5% to ~5.5%), and defined benefit obligations shrank by tens of billions of pounds. But the story is far more nuanced than "rates up, liabilities down."</p>
<p>The key lies in a metric I've derived from public data that, as far as I can tell, nobody else is routinely computing from annual report disclosures: the <strong>hedge ratio</strong>.</p>
<hr>
<h2 id="the-rate-surge-in-context">The rate surge in context</h2>
<p>UK pension discount rates went from ~1.5% (2020) to ~5.5% (2024/25) &mdash; roughly a 400 basis point increase over four years. The bulk of the move (~250&ndash;300bp) happened in a single year, 2022, accelerated by the September mini-budget.</p>
<p>For December 2024 year-ends, UK scheme discount rates now cluster in a remarkably tight band: 5.44% (Barclays) to 5.55% (Lloyds). March 2025 year-ends are slightly higher (5.70&ndash;5.75%) reflecting late-March gilt yields. The profession is effectively pricing off the same curve.</p>
<p>The impact on liabilities was enormous. DBOs fell 6&ndash;16% in the most recent year alone across all 12 companies. Across my sample, total DBOs shrank from roughly &pound;267bn to &pound;237bn &mdash; a ~&pound;30bn reduction in the most recent year alone, on top of much larger falls in 2022.</p>
<p>So far, so straightforward. But the net position &mdash; the number that actually matters &mdash; tells a very different story depending on which company you look at.</p>
<hr>
<h2 id="the-hedge-ratio-a-single-number-that-explains-everything">The hedge ratio: a single number that explains everything</h2>
<p>Every IAS 19 disclosure includes OCI (Other Comprehensive Income) remeasurements. These break out how much of the change in assets and liabilities came from financial assumption changes &mdash; primarily interest rates. By comparing asset sensitivity to liability sensitivity, you can compute how well a scheme's investment portfolio tracks its liabilities when rates move.</p>
<p>I call this the <strong>hedge ratio</strong>: asset loss from rate movements divided by liability gain from rate movements, expressed as a percentage. A hedge ratio of 100% means perfect tracking &mdash; if rates rise and liabilities fall by &pound;1bn, assets also fall by &pound;1bn, and the net position is unchanged. Below 100% means the assets aren't fully tracking liabilities (under-hedged). Above 100% means the assets have <em>more</em> rate sensitivity than the liabilities &mdash; typically because of leveraged LDI.</p>
<p>This is derivable from public OCI data. You don't need access to scheme accounts or investment reports. Yet it's arguably the single most revealing metric for understanding pension risk.</p>
<p>Here's what it shows for my original four companies:</p>
<hr>
<h2 id="four-companies-four-hedge-ratios-four-completely-different-outcomes">Four companies, four hedge ratios, four completely different outcomes</h2>
<h3 id="bp-hedge-ratio-98-the-benchmark">BP &mdash; hedge ratio 98%: the benchmark</h3>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2021</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2022</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2023</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2024</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>DBO ($bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">49.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">29.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">31.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">28.9</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Plan assets ($bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">54.0</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">33.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">33.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">31.4</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Net surplus ($bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+4.1</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+4.0</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+2.0</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+2.6</strong></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>UK discount rate</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">1.8%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.0%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">4.8%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.5%</td>
</tr>
</tbody>
</table>
<p>Despite a 41% collapse in DBO ($49.9bn to $29.5bn in a single year), BP's surplus barely changed &mdash; $4.1bn to $4.0bn. Assets and liabilities fell in near-perfect lockstep. A 98% hedge ratio means almost all rate sensitivity was matched. This is the benchmark for how LDI should work. When the hedge ratio is right, even extreme market moves pass through harmlessly.</p>
<h3 id="bt-hedge-ratio-121-over-hedged">BT &mdash; hedge ratio 121%: over-hedged</h3>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Mar 2021</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Mar 2022</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Mar 2023</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Mar 2024</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Mar 2025</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>DBO (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">59.7</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">56.1</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">42.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~41.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">36.9</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Plan assets (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">54.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">54.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">39.8</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~36.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">32.8</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Net deficit (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(5.1)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(1.1)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(3.1)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>~(4.8)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(4.1)</strong></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Discount rate</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~1.9%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">2.75%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">4.85%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">4.90%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.75%</td>
</tr>
</tbody>
</table>
<p>BT's DBO fell 38% over four years &mdash; from &pound;59.7bn to &pound;36.9bn. Yet the deficit only improved by 20% (from &pound;5.1bn to &pound;4.1bn). Why?</p>
<p>BT's leveraged LDI portfolio had <em>more</em> rate sensitivity than the liabilities it was hedging. In the year to March 2023, asset losses from rate movements (&pound;14.9bn) exceeded liability gains (&pound;12.3bn) by &pound;2.6bn. Rate rises, which should have helped, actually <em>widened</em> the deficit.</p>
<p>BT's pension story is one of volatility, not resolution &mdash; a rollercoaster driven by over-hedging.</p>
<h3 id="tesco-hedge-ratio-124-also-over-hedged">Tesco &mdash; hedge ratio 124%: also over-hedged</h3>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Feb 2022</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Feb 2023</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Feb 2024</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Feb 2025</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>DBO (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">19.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~13.7</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">12.8</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">12.0</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Plan assets (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">22.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~13.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">12.2</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">11.7</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Net position (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+2.8</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(0.4)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(0.6)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(0.2)</strong></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Discount rate</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">2.8%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">4.9%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.1%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.7%</td>
</tr>
</tbody>
</table>
<p>The most counterintuitive result. Tesco went from a &pound;2.8bn surplus to a &pound;0.4bn deficit in a single year, despite discount rates nearly doubling (2.8% to 4.9%). With a 124% hedge ratio, every 1% rate rise reduced liabilities by X but reduced assets by 1.24X &mdash; destroying value on a net basis. Over-hedging via leveraged LDI means rate rises <em>hurt</em> rather than help.</p>
<h3 id="bae-systems-hedge-ratio-53-under-hedged">BAE Systems &mdash; hedge ratio 53%: under-hedged</h3>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2021</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2022</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2023</strong></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"><strong>Dec 2024</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total DBO (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~25.8</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">23.9</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">22.6</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">19.6</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Total assets (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~23.5</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">25.3</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">23.4</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">20.7</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Net position (&pound;bn)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;"><strong>(2.3)</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+1.5</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+0.7</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>+1.2</strong></td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>UK discount rate</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">1.9%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">4.8%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">4.5%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.5%</td>
</tr>
</tbody>
</table>
<p>The most dramatic swing &mdash; from &pound;2.3bn deficit to &pound;1.5bn surplus in one year. But this wasn't skilful management &mdash; it was an under-hedged position that got lucky. When rates surged, group liabilities fell by &pound;11.8bn but assets only fell by &pound;6.3bn. BAE's asset portfolio simply wasn't tracking its liabilities.</p>
<p>If rates had <em>fallen</em> by the same amount, the deficit would have roughly tripled to ~&pound;7.8bn. What looks like a turnaround was actually an unhedged bet that happened to pay off.</p>
<hr>
<h2 id="the-full-picture-all-12-hedge-ratios">The full picture: all 12 hedge ratios</h2>
<p>I computed the same metric for all 12 companies. The results split cleanly into three groups:</p>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Company</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Hedge ratio</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Category</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">What happened</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Lloyds</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>136%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Over-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Surplus eroded despite falling liabilities</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>BP</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>127%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Over-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">UK LDI programme now over-hedged</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Barclays</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>122%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Over-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Surplus eroded despite falling liabilities</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>National Grid</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>~110%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Mildly over-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Surplus stable (approximate &mdash; FX effects in mixed UK/US portfolio)</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Rolls-Royce</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>103%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Well-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Near-neutral impact from rate movements</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Vodafone</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>100%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Perfectly hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Assets and liabilities moved in lockstep</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>BT</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>92%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Under-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">De-leveraged since 2022; deficit slowly improving</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>BAE</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>89%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Under-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Surplus preserved by moderate under-hedging</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>AstraZeneca</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>72%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Under-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Deficit reduced (benefited from rate rises)</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>GSK</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>61%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Under-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Deficit reduced dramatically over 3 years</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Tesco</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>56%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Under-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">De-leveraged since 2022; deficit narrowing</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Shell</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;"><strong>52%</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Under-hedged</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Surplus grew (benefited from rate rises)</td>
</tr>
</tbody>
</table>
<p><em>Hedge ratios computed from OCI remeasurement disclosures: |asset return excl. interest income| / |actuarial gain from financial assumptions on DBO|. Figures based on each company's most recent annual report (2024 or 2025 year-end). Note: these ratios reflect current investment strategies; some companies (notably BT and Tesco) were significantly more hedged in 2022 when the large rate moves occurred &mdash; see narrative sections below.</em></p>
<p>The pattern is striking. Five companies show hedge ratios above 100%, with Lloyds the most extreme at 136%. At the other end, seven companies are under-hedged &mdash; their pension positions are effectively making unhedged bets on the direction of interest rates.</p>
<p>What's particularly interesting is that the picture has shifted since 2022. BT and Tesco, which were over-hedged during the gilt crisis (121% and 124% respectively in the year of the big rate move), have since de-leveraged to 92% and 56%. BP has moved the other way &mdash; from 98% in 2022 to 127% now. Investment strategies are not static.</p>
<p>Only three companies &mdash; Rolls-Royce, Vodafone, and BAE &mdash; sit in the 89&ndash;103% zone where rate movements pass through without materially affecting the net position.</p>
<hr>
<h2 id="the-leveraged-ldi-cluster">The leveraged LDI cluster</h2>
<p>The companies with hedge ratios above 120% &mdash; Lloyds, BP, and Barclays &mdash; all share the hallmarks of leveraged LDI: their assets have <em>more</em> interest rate sensitivity than their liabilities.</p>
<p><strong>Lloyds at 136% is the most extreme case in my sample.</strong> In 2024, rising rates reduced Lloyds' pension obligations by &pound;2.7bn &mdash; but asset losses were &pound;3.7bn. The over-hedging cost &pound;1.0bn on the financial assumptions line alone. Other factors (contributions, experience gains) clawed back some of that, but the surplus still fell from &pound;3.5bn to &pound;2.9bn despite everything moving in what should have been the "right" direction.</p>
<p>The mechanism is visible in Lloyds' asset allocation: 75% of scheme assets are in government bonds (23% fixed-interest, 52% index-linked). The fixed-interest gilts hedge nominal rate movements; the index-linked gilts hedge real rates and inflation. But the combined portfolio has more rate sensitivity than the liabilities it's matching &mdash; the hallmark of leveraged LDI, where schemes use repo and swap overlays to amplify their hedging beyond 100%.</p>
<p><strong>BP at 127%</strong> is a new entrant to the over-hedged club. In the 2022 rate surge, BP's hedge ratio was 98% &mdash; near-perfect. But its most recent OCI shows asset losses of $2.5bn against liability gains of $2.0bn. The UK plan alone shows an even more extreme 160% ratio ($2.4bn asset loss vs $1.5bn liability gain). BP appears to have increased its LDI leverage, particularly through its extensive gilt repo programme ($5.7bn of repo debt funding index-linked and nominal gilts).</p>
<p><strong>Barclays at 122%</strong> tells a similar story &mdash; asset losses of &pound;2.2bn against liability gains of &pound;1.8bn. Like Lloyds, Barclays can afford the drag because of its substantial surplus (&pound;3.0bn). But the over-hedging cost approximately &pound;400m in the year.</p>
<p>The banking sector's over-hedging is no accident. UK bank pension schemes have historically pursued aggressive LDI strategies, often using gilt repo, interest rate swaps, and inflation swaps to amplify their liability-matching exposure beyond 100%. The logic was that in a falling-rate environment, over-hedging provides <em>extra</em> protection. But rates didn't fall &mdash; they tripled. And the leverage worked in reverse.</p>
<p><strong>BT and Tesco were also over-hedged in 2022</strong> (121% and 124% respectively) &mdash; but have since de-leveraged significantly. BT's most recent hedge ratio is 92% and Tesco's is 56%. The 2022 gilt crisis may have prompted a strategic rethink. This is an important observation: hedge ratios are not fixed. Investment strategies evolve, and a company that was over-hedged during the crisis may have a very different risk profile today.</p>
<p><strong>Rolls-Royce provides an interesting contrast.</strong> Its OCI-derived hedge ratio is 103% &mdash; almost perfect. But its sensitivity disclosure tells a different story: a 0.25% decrease in discount rates would increase obligations by &pound;145m while increasing LDI assets by &pound;179m. That's a forward-looking hedge ratio of 123%. This suggests Rolls-Royce may have increased its LDI leverage during 2024, moving from a well-hedged to an over-hedged position &mdash; something to watch in future disclosures.</p>
<hr>
<h2 id="the-under-hedged-lucky-not-skilful">The under-hedged: lucky, not skilful</h2>
<p>At the other end, Shell (52%), Tesco (56%), GSK (61%), AstraZeneca (72%), BAE (89%), and BT (92%) are all currently under-hedged &mdash; their assets have less rate sensitivity than their liabilities. When rates rose, this worked in their favour: assets didn't fall as much as liabilities, so net positions improved.</p>
<p>But this cuts both ways. If rates reverse, these schemes would be the most exposed. An under-hedged scheme that benefits from rising rates is not demonstrating good risk management &mdash; it's demonstrating that an uncontrolled exposure happened to move in a favourable direction.</p>
<p>Shell's 52% hedge ratio is particularly notable given its size ($66bn DBO, the largest in my sample). When rates rose, Shell's liabilities fell by $4.4bn from financial assumption changes, but assets only fell by $2.3bn &mdash; a $2.1bn windfall. Shell's surplus grew from $1.6bn to $3.3bn. But with only half the rate sensitivity matched, a rate reversal would be painful.</p>
<hr>
<h2 id="the-bigger-picture-de-risking-and-the-end-of-db">The bigger picture: de-risking and the end of DB</h2>
<p>Stepping back from hedge ratios, the broader picture across all 12 companies is one of structural transformation:</p>
<p><strong>Seven companies now show net pension surpluses</strong> &mdash; Shell, BAE, BP, Lloyds, Barclays, Vodafone, and National Grid. Three years ago, the majority were in deficit.</p>
<p><strong>Only BT and AstraZeneca have material deficits</strong> &mdash; BT at &pound;4.1bn and AstraZeneca at $1.2bn. Everyone else is either in surplus or near balance (GSK at 99% funded, Tesco and Rolls-Royce just below 100%).</p>
<p><strong>De-risking has reached the end-game.</strong> Shell executed a $5.1bn pension buy-out in 2024. National Grid has 31% of its UK assets in annuity policies. GSK has a &pound;340m buy-in covering one plan. AstraZeneca has a longevity swap covering $2.2bn of liabilities. Barclays expects zero employer contributions in 2025. The direction is clear &mdash; UK defined benefit pensions are being systematically wound down via insurance market transfer.</p>
<p><strong>DC has won.</strong> Where both costs are disclosed, defined contribution pension costs now exceed defined benefit costs at every single company in my sample. Lloyds: &pound;537m DC vs a net DB credit. Shell: $514m DC vs $295m DB. The structural shift to DC is complete &mdash; DB is purely a legacy obligation being run off.</p>
<h3 id="the-current-net-position-across-all-12-companies">The current net position across all 12 companies</h3>
<table style="border-collapse: collapse; width: 100%;" segoe="" ui",="" arial,="" sans-serif;="" font-size:="" 15px;="" margin:="" 16px="" 0;"="">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Company</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Net position</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Funded ratio</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Hedge ratio</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Annual contributions</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Shell</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">+$3.3bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">105%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">52%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">$409m</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>BAE Systems</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">+&pound;1.2bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">106%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">89%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;407m</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Barclays</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">+&pound;3.0bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">115%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">122%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;37m</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>BP</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">+$2.6bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">109%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">127%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">$69m</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Lloyds</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">+&pound;2.9bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">111%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">136%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;172m</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Vodafone</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">+&pound;0.1bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">101%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">100%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;41m</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>National Grid</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">+&pound;1.9bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">114%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~110%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;282m</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>GSK</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">&minus;&pound;0.1bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">99%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">61%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;351m</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Tesco</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">&minus;&pound;0.2bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">98%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">56%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;40m</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Rolls-Royce</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">&minus;&pound;0.2bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">97%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">103%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;74m</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>AstraZeneca</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">&minus;$1.2bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">83%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">72%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">$166m</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>BT Group</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">&minus;&pound;4.1bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">89%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">92%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;856m</td>
</tr>
</tbody>
</table>
<hr>
<h2 id="what-actuaries-should-know">What actuaries should know</h2>
<p>The hedge ratio &mdash; derivable from public OCI data in any IAS 19 disclosure &mdash; is arguably the single most revealing metric for understanding pension risk. It explains why BP sailed through the gilt crisis while BT and Tesco didn't. It reframes BAE's apparent "turnaround" as an unhedged bet. It reveals that Lloyds' &pound;27bn pension scheme has more rate sensitivity in its assets than in its liabilities. And it's not something I've seen routinely computed from annual report data.</p>
<p>Five of 12 companies currently show hedge ratios above 100%, consistent with leveraged LDI. But the picture is evolving. BT and Tesco, which were significantly over-hedged during the 2022 gilt crisis, have since de-leveraged &mdash; while BP has moved from well-hedged to over-hedged. The September 2022 crisis exposed the risks of leveraged LDI when it triggered collateral calls across the UK pension sector, and some schemes clearly responded by reducing their leverage. But the OCI data shows that over-hedging has not disappeared &mdash; it has simply migrated.</p>
<p><strong>The disclosure gap around leverage is a problem.</strong> The hedge ratio I'm computing from OCI data is effectively a backdoor into information that should be disclosed directly but isn't. Some companies are transparent: BP explicitly shows $5.7bn of repo debt in its asset table, and Tesco breaks out &pound;3.3bn in repo agreements and swaps within its LDI portfolio. But Lloyds buries &pound;(8.1)bn in a single "money market, cash, derivatives, other" line with no decomposition. Barclays shows derivatives of &pound;(1.8)bn without further detail. There is no IAS 19 requirement to disclose the degree of leverage or the instruments creating it.</p>
<p>This matters because leverage fundamentally changes the risk character of a pension scheme. When I was an investment partner at Watson Wyatt in 1994 to 1995 &mdash; and their in-house expert on derivatives &mdash; I used to advise pension plan trustees <strong><em>against</em></strong> any form of gearing. My view then, and now, is that pension plan assets should never be in a position where they could become negative. Under leverage, that is theoretically possible: if markets move far enough against the leveraged position, the borrowed obligations can exceed the asset value. A pension scheme is supposed to be a pool of assets backing promises to retirees. Leverage turns it into something closer to a hedge fund.</p>
<p>The OCI-derived hedge ratio makes this visible from public data. But it shouldn't require reverse-engineering. <strong>The degree of leverage &mdash; gross and net exposure, by instrument type &mdash; ought to be a standard IAS 19 disclosure.</strong></p>
<p>This kind of cross-company, multi-year analysis is exactly the sort of work that used to take weeks. I built this dataset &mdash; 12 companies, up to five years of data, full extraction of assumptions, balance sheets, income statements, contributions, asset allocations, sensitivities, and membership &mdash; in a few hours using AI-assisted extraction from publicly available PDFs. The extraction prompt is reusable: point it at any company's annual report and it pulls out the same structured dataset.</p>
<p>The data behind this analysis is available as a premium download for INQA members &mdash; the full 12-company time series dataset, individual company extraction files, and the reusable extraction prompt template.</p>
<hr>
<h2 id="whats-next">What's next</h2>
<p>I'm planning to extend the time series to five years for all 12 companies (currently I have five years for BT, BAE, and BP; four for Tesco; two to three for the rest). I'd also like to add more companies and build an automated extraction pipeline.</p>
<p>If there's a specific company or analysis you'd like to see, let me know.</p>
<p>And if you haven't taken INQA's AI skills baseline assessment yet, it takes about 5 minutes and gives you a personalised score: <a href="https://inqa.group/assessments" target="_blank" rel="noopener noreferrer">Take the assessment</a></p>
<hr>
<p><em>All data extracted from publicly available annual reports (2020&ndash;2025). No proprietary data was used. Analysis assisted by Claude (Anthropic). Hedge ratios computed from OCI remeasurement disclosures.</em></p>]]></content:encoded></item><item><title>The Politics Actuary #6: Long-Term Assumption</title><link>https://pjlee.net/blog/the-politics-actuary-6-long-term-assumption</link><media:content medium="image" url="https://cdn.buttercms.com/IASb6SA5QHCzQGM9FPNw" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 06 Mar 2026 21:01:44 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-6-long-term-assumption</guid><description>The Politics Actuary #6 — the first from the Assumption Theatre theme. The gap between the whiteboard and the world outside the window.</description><content:encoded><![CDATA[<p>This is the first cartoon from the Assumption Theatre theme &mdash; about the dark art of actuarial assumption-setting.</p>
<p>Every actuary has sat in a room where someone wrote a number on a whiteboard, circled it with great authority, and called it a long-term assumption. The fact that the world outside the window looked nothing like the number was, apparently, beside the point.</p>
<p>The profession's ability to define away inconvenient facts with a straight face is genuinely impressive. It is also, occasionally, worth laughing at.</p>
<p><img src="https://cdn.buttercms.com/fzYrNHNTHeTTOfYqXA5Q" alt="undefined"></p>
<p>The Politics Actuary is a weekly cartoon series about actuaries, AI, the profession, and the absurdities of overregulation. It follows a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile.</p>
<p>Any resemblance to real actuaries is entirely intentional.</p>
<p>Previous cartoons: #1 Record Investment | #2 Y-Axis Trick | #3 Prompt Engineering | #4 Transparency Request | #5 Define Everyone</p>]]></content:encoded></item><item><title>I Used AI to Compare Pension Disclosures Across 4 FTSE Companies. Here's What I Found.</title><link>https://pjlee.net/blog/i-used-ai-to-compare-pension-disclosures-across-4-ftse-companies-heres-what-i-found</link><media:content medium="image" url="https://cdn.buttercms.com/VvS4Hbt6QYaziAtiZxoK" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 03 Mar 2026 23:16:01 +0000</pubDate><guid>https://pjlee.net/blog/i-used-ai-to-compare-pension-disclosures-across-4-ftse-companies-heres-what-i-found</guid><description>Four FTSE companies, 20+ data points each, one hour. AI-extracted IAS 19 pension disclosures from BT Group, BAE Systems, Tesco and BP — compared side by side.</description><content:encoded><![CDATA[<p>Four out of five respondents to INQA's AI skills assessment flagged reserving and valuation as the area where they most want to use AI but don't know how. That's a clear signal &mdash; so rather than writing about it in theory, I decided to test it.</p>
<p>I took four FTSE companies &mdash; BT Group, BAE Systems, Tesco, and BP &mdash; downloaded their latest annual reports, and used AI to extract and compare their IAS 19 pension disclosures. The whole process, from downloading the first PDF to having a completed comparison table, took about an hour.</p>
<p>Here's what I found &mdash; and what it tells us about using AI for actuarial analysis.</p>
<hr>
<h2 id="the-process">The process</h2>
<p>The pipeline was straightforward:</p>
<ol>
<li><strong>Download annual reports</strong> &mdash; financial statements PDFs from each company's investor relations page (BT, Tesco) or from companiesmarketcap.com (BAE, whose site blocks automated downloads)</li>
<li><strong>Extract pension disclosure data</strong> &mdash; using a standardised prompt template that asks for 20+ data points across assumptions, balance sheet, income statement, contributions, asset allocation, sensitivities, and membership</li>
<li><strong>Normalise and compare</strong> &mdash; bringing the four extractions into a single comparison table, adjusting for different year ends, age bases, sensitivity increments, and currencies</li>
</ol>
<p>The extraction prompt template is reusable &mdash; point it at any UK company annual report and it pulls out the same structured dataset. That's the bit that makes this scalable.</p>
<hr>
<h2 id="the-headline-numbers">The headline numbers</h2>
<table style="border-collapse: collapse; width: 100%; font-family: 'Segoe UI', Arial, sans-serif; font-size: 15px; margin: 16px 0;">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;"></th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">BT Group</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">BAE Systems</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Tesco</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">BP</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Year end</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">31 Mar 2025</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">31 Dec 2024</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">22 Feb 2025</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">31 Dec 2024</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>DBO</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;36.9bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;19.6bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;12.0bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">$28.9bn</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Plan assets</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;32.8bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;20.6bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;11.7bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">$31.4bn</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Net position</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">Deficit &pound;4.1bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">Surplus &pound;0.8bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">Deficit &pound;0.2bn</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">Surplus $2.6bn</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Funded ratio</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #c0392b; font-weight: 600;">89%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">106%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">98%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; color: #27ae60; font-weight: 600;">109%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Annual cash contributions</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;856m</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;407m</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&pound;40m</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">$69m</td>
</tr>
<tr>
<td style="padding: 9px 14px; font-weight: 600; color: #333;"><strong>Discount rate</strong></td>
<td style="padding: 9px 14px;">5.75%</td>
<td style="padding: 9px 14px;">5.5%</td>
<td style="padding: 9px 14px;">5.7%</td>
<td style="padding: 9px 14px;">5.5%</td>
</tr>
</tbody>
</table>
<p><em>BP reports in USD ($1 &asymp; &pound;0.79 at 31 Dec 2024). Its UK plan assumptions (discount rate, inflation, mortality) are sterling-based and directly comparable to the other three companies &mdash; only the monetary amounts are translated.</em></p>
<hr>
<h2 id="six-things-that-stand-out">Six things that stand out</h2>
<h3 id="1-bt-is-an-outlier">1. BT is an outlier</h3>
<p>BT's pension scheme dominates the picture &mdash; a &pound;4.1bn deficit with annual cash contributions of &pound;856m, scheduled to continue at &pound;780m pa until 2030. The other three companies are in or near surplus. BT's cash outflow is dominated by deficit repair contributions (&pound;803m of the &pound;856m total) &mdash; a direct consequence of the shortfall. By contrast, Tesco's scheme is nearly fully funded and requires just &pound;40m a year.</p>
<h3 id="2-discount-rates-converge">2. Discount rates converge</h3>
<p>All four companies use discount rates in a tight 5.5%&ndash;5.75% band, consistent with the WTW FTSE 100 median of 5.55%. BT's slightly higher rate (5.75%) reflects its later year end &mdash; gilt yields rose during Q1 2025. Ironically, that timing works in BT's favour: had it used 5.5% like BAE and BP, its DBO would have been higher and the deficit even larger.</p>
<h3 id="3-everyone-uses-cmi-2023">3. Everyone uses CMI 2023</h3>
<p>All four companies have adopted CMI 2023 mortality projections (Tesco with a slightly unusual CMI 2020 base projected to 2018, then CMI 2023 for future improvements). Long-term improvement rates range from 1.0% pa (BAE, Tesco) to undisclosed (BT).</p>
<h3 id="4-life-expectancy-varies-more-than-you-might-expect">4. Life expectancy varies more than you might expect</h3>
<p>Male life expectancy at 65 ranges from 19.6 years (Tesco) to approximately 22 years (BP's UK scheme). Female life expectancy shows a similar pattern &mdash; 22.2 years at Tesco versus approximately 24 years at BP. The gap is consistent across both sexes, which points to the socio-economic profile of each company's workforce rather than differences in sex mix. Tesco's largely blue-collar scheme population has materially lower longevity than BP's.</p>
<p>BT goes further &mdash; splitting life expectancy by "pension bracket" (higher vs lower earners within the same scheme), which explicitly models socio-economic mortality differentials.</p>
<h3 id="5-dc-now-exceeds-db-everywhere">5. DC now exceeds DB everywhere</h3>
<p>All four companies spend more on defined contribution pensions than on their defined benefit schemes. BT: &pound;305m DC vs &pound;225m DB. Tesco: &pound;454m DC vs &pound;49m DB. Three of the four schemes (BT, Tesco, BP UK) are fully closed to accrual &mdash; reflecting past service only. BAE is the exception: its scheme is closed to new entrants but existing members are still accruing benefits, which is why its current service cost (&pound;134m) is roughly 10x higher than BT's or Tesco's.</p>
<h3 id="6-de-risking-is-universal">6. De-risking is universal</h3>
<p>Growth asset allocations range from approximately 25% (BP) to 45% (Tesco). LDI strategies, longevity hedging, and cash flow matching are in place across all four schemes. BP has the most defensive allocation &mdash; 48% in index-linked government bonds alone.</p>
<p>A question worth asking: given the likely significant disruption to the economy from AI over the next decade &mdash; arguably earlier &mdash; are index-linked government bonds really going to remain low risk? What happens to sovereign creditworthiness when income tax receipts fall significantly? The de-risking consensus assumes a continuity that AI may not deliver.</p>
<hr>
<h2 id="key-assumptions-comparison">Key assumptions comparison</h2>
<table style="border-collapse: collapse; width: 100%; font-family: 'Segoe UI', Arial, sans-serif; font-size: 15px; margin: 16px 0;">
<thead>
<tr>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Assumption</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">BT</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">BAE</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">Tesco</th>
<th style="background: #1a1a2e; color: white; padding: 10px 14px; text-align: left; font-weight: 600;">BP</th>
</tr>
</thead>
<tbody>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Discount rate</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.75%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.5%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.7%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">5.5%</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>RPI inflation</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">3.10%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">2.9%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">3.0%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">3.1%</td>
</tr>
<tr>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>CPI inflation</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">2.60%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">2.3%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">~2.6%</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">&mdash;</td>
</tr>
<tr style="background: #f4f6f9;">
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8; font-weight: 600; color: #333;"><strong>Mortality model</strong></td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">CMI 2023</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">CMI 2023</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">CMI 2023</td>
<td style="padding: 9px 14px; border-bottom: 1px solid #e8e8e8;">Not specified</td>
</tr>
<tr>
<td style="padding: 9px 14px; font-weight: 600; color: #333;"><strong>Male LE at 65</strong></td>
<td style="padding: 9px 14px;">~20&ndash;22 yrs</td>
<td style="padding: 9px 14px;">20&ndash;23 yrs</td>
<td style="padding: 9px 14px;">19.6 yrs</td>
<td style="padding: 9px 14px;">~22 yrs</td>
</tr>
</tbody>
</table>
<p>BT and Tesco both disclose bifurcated RPI/CPI assumptions reflecting the 2030 RPI reform (when RPI will be aligned with CPIH, narrowing the RPI-CPI gap significantly) &mdash; a nuance that older analyses would miss.</p>
<hr>
<h2 id="what-ai-can-and-cant-do-here">What AI can and can't do here</h2>
<p><strong>What worked well:</strong></p>
<ul>
<li>Extracting structured data from narrative pension notes &mdash; AI handles this faster and more consistently than manual reading</li>
<li>Identifying which note contains the IAS 19 disclosures and pulling the right pages</li>
<li>Producing structured markdown that's easy to compare across companies</li>
</ul>
<p><strong>What needed human judgement:</strong></p>
<ul>
<li>Normalising across different disclosure formats (BAE quotes life expectancy as absolute age, not years remaining; BT presents sensitivities as charts, not tables; BP reports in USD)</li>
<li>Spotting subtleties like Tesco's unusual CMI base year treatment</li>
<li>Deciding which figures to use when companies have multiple schemes or report at different levels (UK only vs total group)</li>
</ul>
<p>This isn't "AI replaces the actuary." It's "AI does the extraction in minutes instead of hours, so the actuary can focus on the analysis."</p>
<hr>
<h2 id="why-this-matters-for-actuaries">Why this matters for actuaries</h2>
<p>Comparative IAS 19 analysis is a consulting product. Firms charge real money to produce benchmarking reports that look a lot like the table above. The data is all public &mdash; it's just time-consuming to extract manually.</p>
<p>With a reusable extraction prompt and an hour of time, I produced a comparison across four major companies. Scaling to 10 or 20 companies would take proportionally longer but the process is the same. Adding historical years to show trends over time is the obvious next step.</p>
<p>If you're an actuary who's been wondering what AI could actually do in your day-to-day work &mdash; this is a concrete example. Not hypothetical, not a toy demo. Real data, real companies, real findings.</p>
<hr>
<h2 id="whats-next">What's next</h2>
<p>I'm planning to expand this to more companies and add time series data. If there's a specific company or comparison you'd like to see, let me know.</p>
<p>And if you haven't taken INQA's AI skills baseline assessment yet, it takes about 5 minutes and gives you a personalised score: <a href="https://inqa.group/assessments" target="_blank" rel="noopener noreferrer">Take the assessment</a></p>
<hr>
<p><em>All data extracted from publicly available annual reports (BT Group FY 2024/25, BAE Systems FY 2024, Tesco FY 2024/25, BP FY 2024). No proprietary data was used. Analysis assisted by Claude (Anthropic).</em></p>]]></content:encoded></item><item><title>The Politics Actuary #5 - Define "Everyone"</title><link>https://pjlee.net/blog/the-politics-actuary-5-define-everyone</link><media:content medium="image" url="https://cdn.buttercms.com/vteMKgMTheIFNdGZFel3" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 02 Mar 2026 19:18:35 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-5-define-everyone</guid><description>Cartoon #5 in the series. When an eleven-year-old deploys the "everyone has one" argument at the dinner table, most parents cave. An actuarial parent reaches for the notepad.</description><content:encoded><![CDATA[<p><em>The Politics Actuary</em> is a weekly cartoon about what happens when an actuary watches the news, reads the small print, and can't keep quiet about it.</p>
<p>Set in a fictional household &mdash; a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile &mdash; the series takes on politics, the profession, everyday life, and the absurdities of overregulation.</p>
<p></p>
<p>Cartoon #5 in the series. When an eleven-year-old deploys the "everyone has one" argument at the dinner table, most parents cave. An actuarial parent reaches for the notepad.</p>]]></content:encoded></item><item><title>The Politics Actuary #4 — Transparency Request</title><link>https://pjlee.net/blog/the-politics-actuary-4-transparency-request</link><media:content medium="image" url="https://cdn.buttercms.com/SJhwYteTSCTPW7fK5d6A" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 02 Mar 2026 19:15:27 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-4-transparency-request</guid><description>The Politics Actuary is a weekly cartoon about what happens when an actuary watches the news, reads the small print, and can't keep quiet about it. Set in a fictional household — a dad who can't switch off his professional brain, a family who've learned to live with it, and ...</description><content:encoded><![CDATA[<p><em>The Politics Actuary</em> is a weekly cartoon about what happens when an actuary watches the news, reads the small print, and can't keep quiet about it.</p>
<p>Set in a fictional household &mdash; a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile &mdash; the series takes on politics, the profession, everyday life, and the absurdities of overregulation.</p>
<p>"She'd spent her whole career promoting transparent financial disclosure from pension funds. Her own professional body seemed to regard similar transparency as unnecessary despite having highly numerate members."</p>
<p>The profession that built its reputation on transparent financial analysis apparently regards similar transparency about its own finances as unnecessary.</p>
<p>Any resemblance to real actuaries is entirely intentional.</p>
<p>New cartoons every week. Follow on LinkedIn, pjlee.net or X (@politicsactuary).</p>]]></content:encoded></item><item><title>The Politics Actuary #3: Prompt Engineering</title><link>https://pjlee.net/blog/the-politics-actuary-3-prompt-engineering</link><media:content medium="image" url="https://cdn.buttercms.com/tFHuAvFMRjCa6U24bywH" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 02 Mar 2026 18:53:04 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-3-prompt-engineering</guid><description>The Politics Actuary is a weekly single-panel cartoon about actuaries, politics, the profession, everyday life, and the absurdities of overregulation. It follows a fictional household: a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile. Any resemblance to ...</description><content:encoded><![CDATA[<p><em>The Politics Actuary</em> is a weekly single-panel cartoon about actuaries, politics, the profession, everyday life, and the absurdities of overregulation. It follows a fictional household: a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile.</p>
<p>Any resemblance to real actuaries is entirely intentional.</p>
<p><em>You've spent three hours teaching the computer to think exactly like you. You could have just done the work yourself." "That's not the point, Beth."</em></p>]]></content:encoded></item><item><title>The Politics Actuary #2 — Y-Axis Trick</title><link>https://pjlee.net/blog/the-politics-actuary-2-y-axis-trick</link><media:content medium="image" url="https://cdn.buttercms.com/UZ1LqB2rReMgEDkL2Img" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 02 Mar 2026 18:51:04 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-2-y-axis-trick</guid><description>The Politics Actuary is a weekly cartoon about what happens when an actuary watches the news, reads the small print, and can't keep quiet about it. Set in a fictional household — a dad who can't switch off his professional brain, a family who've learned to live with it, and ...</description><content:encoded><![CDATA[<div>The Politics Actuary is a weekly cartoon about what happens when an actuary watches the news, reads the small print, and can't keep quiet about it.</div>
<div></div>
<div>Set in a fictional household &mdash; a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile &mdash; the series takes on politics, the profession, everyday life, and the absurdities of overregulation.</div>
<div></div>
<div></div>]]></content:encoded></item><item><title>The Politics Actuary #1 - Record Investment</title><link>https://pjlee.net/blog/the-politics-actuary-1-record-investment</link><media:content medium="image" url="https://cdn.buttercms.com/0tF4UrlqSmSa28KCW31j" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 02 Mar 2026 18:46:28 +0000</pubDate><guid>https://pjlee.net/blog/the-politics-actuary-1-record-investment</guid><description>This is the first in a new weekly series: The Politics Actuary.


The idea: an actuary's eye applied to politics, the profession, everyday life, and the absurdities of overregulation — through the medium of single-panel cartoons. Most practising actuaries self-censor on anything beyond the anodyne, because legacy professional bodies tend to discourage public commentary with any edge to it. I no longer have that constraint.


The cartoons follow a fictional actuarial household — a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile. Any resemblance to real actuaries is entirely intentional.</description><content:encoded><![CDATA[<div>This is the first in a new weekly series:&nbsp;The Politics Actuary.</div>
<div>
<div></div>
<div>The idea: an actuary's eye applied to politics, the profession, everyday life, and the absurdities of overregulation &mdash; through the medium of single-panel cartoons. Most practising actuaries self-censor on anything beyond the anodyne, because legacy professional bodies tend to discourage public commentary with any edge to it. I no longer have that constraint.</div>
<div></div>
<div>The cartoons follow a fictional actuarial household &mdash; a dad who can't switch off his professional brain, a family who've learned to live with it, and an inexplicable pet crocodile. Any resemblance to real actuaries is entirely intentional.</div>
</div>]]></content:encoded></item><item><title>107+ Free Public Datasets Every Actuary Should Know About</title><link>https://pjlee.net/blog/107-free-public-datasets-every-actuary-should-know-about</link><media:content medium="image" url="https://cdn.buttercms.com/WlGqFgrXTPGHPD66xoFe" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 28 Feb 2026 22:04:29 +0000</pubDate><guid>https://pjlee.net/blog/107-free-public-datasets-every-actuary-should-know-about</guid><description>A curated reference of over 107 freely accessible datasets relevant to actuarial work — covering UK sources from the ONS, Bank of England, and Environment Agency, plus international data from the US, Canada, Australia, the EU, and global bodies like the WHO, World Bank, and UN. Organised by practice area with a quick-reference table by actuarial specialty</description><content:encoded><![CDATA[<p>Whether you're validating a mortality model, stress-testing reserving assumptions, exploring climate risk, or simply brushing up on a new practice area, access to good data is everything. The problem isn't that the data doesn't exist &mdash; it's that it's scattered across dozens of government agencies, international bodies, and academic institutions, each with their own formats and quirks.</p>
<p>I've spent time pulling together this curated reference: over 107 freely accessible, regularly updated datasets relevant to actuarial work. It covers UK sources in depth (the ONS, Bank of England, Environment Agency, and many more) and extends internationally to the US, Canada, Australia, the EU, and global bodies like the WHO, World Bank, and UN.</p>
<p>This isn't a lightweight listicle. It's meant to be a working reference &mdash; something you bookmark and come back to when you need data for a specific project. Every link points to an established, official source. Every description is drawn from the actual dataset documentation.</p>
<p>A few things to note before diving in:</p>
<ul>
<li><strong>All datasets listed here are free.</strong> Some require free registration (noted where applicable), but none require paid subscriptions.</li>
<li><strong>CMI data is not included.</strong> The Continuous Mortality Investigation mortality projection models (e.g. CMI_2023) are the industry standard for UK pension scheme mortality assumptions, but they require an IFoA subscription. The ONS data they're partly derived from <em>is</em> included below.</li>
<li><strong>Government URLs can change.</strong> If a link doesn't resolve, search the publisher's website for the dataset name &mdash; the dataset names and publishers are the stable identifiers.</li>
</ul>
<hr>
<h2 id="table-of-contents">Table of Contents</h2>
<p><strong>UK Datasets</strong></p>
<ol>
<li><a href="#1-mortality-and-life-tables">Mortality and Life Tables</a></li>
<li><a href="#2-population-projections">Population Projections</a></li>
<li><a href="#3-pension-statistics">Pension Statistics</a></li>
<li><a href="#4-road-traffic-and-motor-insurance">Road Traffic and Motor Insurance</a></li>
<li><a href="#5-crime-statistics">Crime Statistics</a></li>
<li><a href="#6-flood-risk-and-climate">Flood Risk and Climate</a></li>
<li><a href="#7-property-data">Property Data</a></li>
<li><a href="#8-health-and-disease">Health and Disease</a></li>
<li><a href="#9-income-and-earnings">Income and Earnings</a></li>
<li><a href="#10-house-prices">House Prices</a></li>
<li><a href="#11-inflation-and-price-indices">Inflation and Price Indices</a></li>
<li><a href="#12-interest-rates-and-gilt-yields">Interest Rates and Gilt Yields</a></li>
<li><a href="#13-student-loans">Student Loans</a></li>
<li><a href="#14-census-and-population-estimates">Census and Population Estimates</a></li>
<li><a href="#15-migration-and-births">Migration and Births</a></li>
</ol>
<p><strong>International Datasets</strong></p>
<ol start="16">
<li><a href="#16-international-mortality-and-life-tables">International Mortality and Life Tables</a></li>
<li><a href="#17-insurance-and-claims-data">Insurance and Claims Data</a></li>
<li><a href="#18-international-health-data">International Health Data</a></li>
<li><a href="#19-international-demographics-and-population">International Demographics and Population</a></li>
<li><a href="#20-international-finance-and-economics">International Finance and Economics</a></li>
<li><a href="#21-pensions-and-social-security">Pensions and Social Security</a></li>
<li><a href="#22-catastrophe-and-climate-data">Catastrophe and Climate Data</a></li>
<li><a href="#23-additional-specialist-sources">Additional Specialist Sources</a></li>
</ol>
<p><strong>Reference</strong></p>
<ol start="24">
<li><a href="#24-quick-reference-by-actuarial-specialty">Quick Reference by Actuarial Specialty</a></li>
<li><a href="#25-multi-domain-data-portals">Multi-Domain Data Portals</a></li>
<li><a href="#26-tips-for-working-with-these-datasets">Tips for Working with These Datasets</a></li>
</ol>
<hr>
<h1 id="uk-datasets">UK Datasets</h1>
<h2 id="1-mortality-and-life-tables">1. Mortality and Life Tables</h2>
<p><strong>National Life Tables, United Kingdom</strong> &mdash; ONS Period life tables giving mortality rates (qx), survival probabilities, and life expectancy by single year of age and sex. Based on population estimates and death registrations. Separate tables for England and Wales, Scotland, and Northern Ireland. Updated annually. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/lifeexpectancies/datasets/nationallifetablesunitedkingdomreferencetables">ons.gov.uk &mdash; National Life Tables</a></p>
<p><strong>Single Year Life Tables, England and Wales</strong> &mdash; ONS Historical single-year life tables from 1841 onwards. Invaluable for long-term mortality trend analysis. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/lifeexpectancies/datasets/singleyearlifetablesuk1702to2070">ons.gov.uk &mdash; Single Year Life Tables</a></p>
<p><strong>Death Registrations Summary Tables, England and Wales</strong> &mdash; ONS Annual deaths by age, sex, and cause. Includes crude and age-standardised mortality rates. Also the primary source for leading causes of death analysis by ICD-10 chapter. Updated annually. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/deathregistrationssummarytablesenglandandwalesreferencetables">ons.gov.uk &mdash; Death Registrations</a></p>
<p><strong>Weekly Death Registrations, England and Wales</strong> &mdash; ONS Weekly provisional death counts by age group. Widely used for monitoring excess mortality during COVID-19 and remains a key real-time mortality indicator. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/deaths/datasets/weeklyprovisionalfiguresondeathsregisteredinenglandandwales">ons.gov.uk &mdash; Weekly Deaths</a></p>
<p><strong>Mortality Statistics by Cause of Death</strong> &mdash; ONS / NOMIS Detailed mortality by cause of death, age, sex, and area. Based on ICD-10 coding. NOMIS provides flexible query tools for custom tabulations. <a href="https://www.nomisweb.co.uk/">nomisweb.co.uk</a></p>
<p><strong>Death Statistics, Scotland</strong> &mdash; National Records of Scotland Scottish death registrations, life tables, and mortality rates by age, sex, cause, and area. Separate from ONS England and Wales data. Includes quarterly and weekly provisional figures. <a href="https://www.nrscotland.gov.uk/statistics-and-data/statistics/statistics-by-theme/vital-events/deaths">nrscotland.gov.uk &mdash; Deaths</a></p>
<p><strong>Death Statistics, Northern Ireland</strong> &mdash; NISRA Northern Ireland death registrations and mortality statistics by age, sex, and cause. <a href="https://www.nisra.gov.uk/statistics/births-deaths-and-marriages/deaths">nisra.gov.uk &mdash; Deaths</a></p>
<hr>
<h2 id="2-population-projections">2. Population Projections</h2>
<p><strong>National Population Projections</strong> &mdash; ONS Principal and variant projections by single year of age and sex for the UK. Includes high/low fertility, mortality, and migration variants. Essential for longevity and demographic assumptions in pension valuations. Updated every two years. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationprojections/datasets/tablea11principalprojectionukpopulationinagegroups">ons.gov.uk &mdash; National Population Projections</a></p>
<p><strong>Subnational Population Projections</strong> &mdash; ONS Population projections by local authority, age, and sex. Useful for regional pension and insurance analysis. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationprojections/datasets/localauthoritiesinenglandtable2">ons.gov.uk &mdash; Subnational Projections</a></p>
<hr>
<h2 id="3-pension-statistics">3. Pension Statistics</h2>
<p><strong>Occupational Pension Schemes Survey (OPSS)</strong> &mdash; ONS Members, contributions, assets, and benefits by scheme type (DB/DC). Tracks the ongoing shift from defined benefit to defined contribution. Updated annually. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/personalandhouseholdfinances/pensionssavingsandinvestments/datasets/occupationalpensionschemessurvey">ons.gov.uk &mdash; OPSS</a></p>
<p><strong>Scheme Return Data</strong> &mdash; The Pensions Regulator Aggregated data from pension scheme returns including membership, funding levels, and demographics. Includes the Purple Book (PPF/TPR annual publication on the UK DB pensions landscape). <a href="https://www.thepensionsregulator.gov.uk/en/document-library/research-and-analysis/scheme-return-data">thepensionsregulator.gov.uk &mdash; Scheme Return Data</a></p>
<p><strong>Pensioners' Incomes Series</strong> &mdash; DWP Detailed analysis of pensioner incomes by source, age group, and family type. Key for understanding retirement income adequacy. <a href="https://www.gov.uk/government/collections/pensioners-incomes-series-statistics--3">gov.uk &mdash; Pensioners' Incomes</a></p>
<p><strong>State Pension Statistics</strong> &mdash; DWP (via Stat-Xplore) Interactive tool providing state pension recipient data by age, amount, and geographical area. Also covers other DWP benefits. Free registration required. <a href="https://stat-xplore.dwp.gov.uk/">stat-xplore.dwp.gov.uk</a></p>
<p><strong>Family Resources Survey</strong> &mdash; DWP Major household survey covering income, pension participation, savings, disability, and housing costs. Sample of approximately 20,000 households per year. Microdata available via UK Data Service. <a href="https://www.gov.uk/government/collections/family-resources-survey--2">gov.uk &mdash; Family Resources Survey</a></p>
<hr>
<h2 id="4-road-traffic-and-motor-insurance">4. Road Traffic and Motor Insurance</h2>
<p><strong>STATS19 Road Safety Data</strong> &mdash; Department for Transport The definitive UK road accident dataset. Every injury road accident reported to police in Great Britain, with details of circumstances, vehicles, and casualties. Three linked tables: Accident, Vehicle, and Casualty. Georeferenced. <a href="https://www.data.gov.uk/dataset/cb7ae6f0-4be6-4935-9277-47e5ce24a11f/road-safety-data">data.gov.uk &mdash; Road Safety Data</a></p>
<p><strong>Road Traffic Statistics</strong> &mdash; Department for Transport Traffic volume data (vehicle miles/kilometres) by road type, vehicle type, and region. Essential exposure denominators when analysing STATS19 data. <a href="https://www.gov.uk/government/statistical-data-sets/road-traffic-statistics-tra">gov.uk &mdash; Road Traffic Statistics</a></p>
<p><strong>MOT Test Data</strong> &mdash; DfT / DVSA Anonymised MOT test results for all vehicles in Great Britain: make, model, year, mileage, test outcome, and failure reasons. Hundreds of millions of records. <a href="https://www.data.gov.uk/dataset/e3939ef8-30c7-4ca8-9c7c-ad9475cc9b2f/anonymised-mot-tests-and-results">data.gov.uk &mdash; MOT Tests</a></p>
<hr>
<h2 id="5-crime-statistics">5. Crime Statistics</h2>
<p><strong>Police Recorded Crime</strong> &mdash; Home Office / data.police.uk Street-level crime and outcome data for every police force in England, Wales, and Northern Ireland. Each record includes crime type, approximate location, and outcome. Millions of records per year. <a href="https://data.police.uk/data/">data.police.uk</a></p>
<p><strong>Crime Survey for England and Wales (CSEW)</strong> &mdash; ONS Survey-based crime data including crimes not reported to police. Covers household crime, personal crime, and fraud/cybercrime, giving a broader picture than police-recorded data alone. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/crimeandjustice/datasets/crimeinenglandandwalesappendixtables">ons.gov.uk &mdash; Crime Survey</a></p>
<hr>
<h2 id="6-flood-risk-and-climate">6. Flood Risk and Climate</h2>
<p><strong>Environment Agency Flood Maps</strong> &mdash; Environment Agency Flood zone maps (Zones 1, 2, 3a, 3b), flood risk from rivers and sea, and surface water flood risk. Spatial data for England. Critical for property insurance pricing and exposure management. <a href="https://environment.data.gov.uk/">environment.data.gov.uk</a></p>
<p><strong>Met Office HadUK-Grid</strong> &mdash; Met Office / CEDA Archive Gridded climate observations for the UK: temperature, rainfall, sunshine, wind, humidity. 1km resolution from 1836 to present. The definitive observational climate dataset for the UK. <a href="https://www.metoffice.gov.uk/research/climate/maps-and-data/data/haduk-grid/haduk-grid">metoffice.gov.uk &mdash; HadUK-Grid</a></p>
<p><strong>UK Climate Projections (UKCP)</strong> &mdash; Met Office Probabilistic climate projections for the UK under different emissions scenarios. Temperature, precipitation, sea level, wind. Essential for long-term climate risk assessment. <a href="https://www.metoffice.gov.uk/research/approach/collaboration/ukcp">metoffice.gov.uk &mdash; UKCP</a></p>
<p><strong>SEPA Flood Maps, Scotland</strong> &mdash; Scottish Environment Protection Agency Flood risk maps for Scotland, covering river, coastal, and surface water flooding. <a href="https://www.sepa.org.uk/environment/water/flooding/flood-maps/">sepa.org.uk &mdash; Flood Maps</a></p>
<hr>
<h2 id="7-property-data">7. Property Data</h2>
<p><strong>Price Paid Data</strong> &mdash; HM Land Registry Every residential property transaction in England and Wales since 1995. Includes price, date, postcode, property type (detached, semi, terraced, flat), new build flag, and tenure. Updated monthly. <a href="https://www.gov.uk/government/statistical-data-sets/price-paid-data-downloads">gov.uk &mdash; Price Paid Data</a></p>
<p><strong>Energy Performance Certificate (EPC) Data</strong> &mdash; MHCLG EPC ratings for domestic and non-domestic buildings in England and Wales. Includes energy efficiency rating, floor area, wall type, heating type, and construction age. Over 20 million certificates. Free registration required. <a href="https://epc.opendatacommunities.org/">epc.opendatacommunities.org</a></p>
<hr>
<h2 id="8-health-and-disease">8. Health and Disease</h2>
<p><strong>Hospital Episode Statistics (HES) Summary Data</strong> &mdash; NHS England Summary statistics on hospital admissions in England: admitted patient care, outpatient attendances, and A&amp;E attendances. Published tables are freely available. <a href="https://digital.nhs.uk/data-and-information/publications/statistical/hospital-admitted-patient-care-activity">digital.nhs.uk &mdash; HES</a></p>
<p><strong>Health Survey for England (HSE)</strong> &mdash; NHS England / OHID Annual survey of approximately 8,000 adults and 2,000 children covering health behaviours (smoking, drinking, physical activity), measurements (BMI, blood pressure), and self-reported health conditions. <a href="https://digital.nhs.uk/data-and-information/publications/statistical/health-survey-for-england">digital.nhs.uk &mdash; HSE</a></p>
<p><strong>Public Health Profiles (Fingertips)</strong> &mdash; NHS England / OHID Hundreds of health indicators at local authority level and above: life expectancy, mortality by cause, disease prevalence, health inequalities, and much more. <a href="https://fingertips.phe.org.uk/">fingertips.phe.org.uk</a></p>
<p><strong>Cancer Registration Statistics</strong> &mdash; ONS / NHS England Cancer incidence by site, age, sex, and stage at diagnosis. England's cancer registration is among the most complete in the world. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/cancerregistrationstatisticscancerregistrationstatisticsengland">ons.gov.uk &mdash; Cancer Registration</a></p>
<p><strong>Cancer Survival Statistics</strong> &mdash; ONS One-year and five-year cancer survival rates by cancer site, age, sex, and stage. Critical for assessing critical illness claim probabilities. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/healthandsocialcare/conditionsanddiseases/datasets/cancersurvivalratescancersurvivalinenglandadultsdiagnosed">ons.gov.uk &mdash; Cancer Survival</a></p>
<p><strong>Quality and Outcomes Framework (QOF) Prevalence Data</strong> &mdash; NHS England Disease prevalence rates at GP practice level for diabetes, cardiovascular disease, COPD, mental health conditions, and many others. Covers most of England's GP-registered population. <a href="https://digital.nhs.uk/data-and-information/publications/statistical/quality-and-outcomes-framework-achievement-prevalence-and-exceptions-data">digital.nhs.uk &mdash; QOF</a></p>
<p><strong>UKHSA Data Dashboard</strong> &mdash; UK Health Security Agency Public health surveillance data including COVID-19, respiratory viruses, vaccinations, and antimicrobial resistance. Replaced the original COVID-19 dashboard with broader health monitoring. <a href="https://ukhsa-dashboard.data.gov.uk/">ukhsa-dashboard.data.gov.uk</a></p>
<hr>
<h2 id="9-income-and-earnings">9. Income and Earnings</h2>
<p><strong>Annual Survey of Hours and Earnings (ASHE)</strong> &mdash; ONS The most detailed source of earnings data in the UK. Pay distributions by region, occupation, age, sex, industry sector, and full-time/part-time status. Based on a 1% sample of PAYE employees. <a href="https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/bulletins/annualsurveyofhoursandearnings/latest">ons.gov.uk &mdash; ASHE</a></p>
<p><strong>Effects of Taxes and Benefits on Household Income</strong> &mdash; ONS Shows original, gross, disposable, and post-tax income by decile. Useful for understanding income redistribution and inequality. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/personalandhouseholdfinances/incomeandwealth/datasets/theeffectsoftaxesandbenefitsonhouseholdincomefinancialyearending2014">ons.gov.uk &mdash; Taxes and Benefits</a></p>
<hr>
<h2 id="10-house-prices">10. House Prices</h2>
<p><strong>UK House Price Index (UK HPI)</strong> &mdash; HM Land Registry / ONS The official UK house price index. Average prices by property type and area, monthly price changes, and volume of sales. Coverage across all four UK nations. <a href="https://www.gov.uk/government/statistical-data-sets/uk-house-price-index-data-downloads-november-2017">gov.uk &mdash; UK HPI</a></p>
<hr>
<h2 id="11-inflation-and-price-indices">11. Inflation and Price Indices</h2>
<p><strong>Consumer Price Inflation Tables</strong> &mdash; ONS CPI and CPIH monthly time series. Detailed indices by COICOP category (food, housing, transport, etc.). Essential for inflation-linked benefit calculations in pension schemes. <a href="https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/consumerpriceinflation">ons.gov.uk &mdash; Consumer Price Inflation</a></p>
<p><strong>RPI Reference Tables</strong> &mdash; ONS Long-running RPI time series from 1947 to present. Still widely used for index-linked benefits in pension schemes despite the planned reform of RPI. <a href="https://www.ons.gov.uk/economy/inflationandpriceindices/timeseries/chaw/mm23">ons.gov.uk &mdash; RPI</a></p>
<hr>
<h2 id="12-interest-rates-and-gilt-yields">12. Interest Rates and Gilt Yields</h2>
<p><strong>Bank of England Yield Curves</strong> &mdash; Bank of England Nominal and real (index-linked) government bond yield curves estimated daily. Spot rates, forward rates, and implied inflation term structure. Essential for discount rate setting and asset-liability matching in pension valuations. <a href="https://www.bankofengland.co.uk/statistics/yield-curves">bankofengland.co.uk &mdash; Yield Curves</a></p>
<p><strong>Bank Rate History</strong> &mdash; Bank of England Complete history of Bank Rate (base rate) changes. Simple but essential for economic modelling. <a href="https://www.bankofengland.co.uk/boeapps/database/Bank-Rate.asp">bankofengland.co.uk &mdash; Bank Rate</a></p>
<p><strong>Bank of England Statistical Interactive Database</strong> &mdash; Bank of England Comprehensive monetary and financial statistics: money supply, lending data, exchange rates, effective interest rates. Flexible query builder. <a href="https://www.bankofengland.co.uk/statistics">bankofengland.co.uk &mdash; Statistics</a></p>
<p><strong>DMO Gilt Data</strong> &mdash; UK Debt Management Office Details of all outstanding gilts (conventional and index-linked), including coupon, maturity date, amount outstanding, prices, and auction results. <a href="https://www.dmo.gov.uk/responsibilities/gilt-market/gilt-data/">dmo.gov.uk &mdash; Gilt Data</a></p>
<hr>
<h2 id="13-student-loans">13. Student Loans</h2>
<p><strong>Student Loans Company Statistics</strong> &mdash; SLC / DfE Statistics on student loan borrowers, repayments, outstanding balances by repayment plan, and demographic breakdowns. <a href="https://www.gov.uk/government/collections/student-loans-company-statistics">gov.uk &mdash; Student Loans</a></p>
<p><strong>Student Loan Forecasts</strong> &mdash; OBR Long-term student loan forecasts including expected write-offs, RAB charge, and repayment profiles by cohort. <a href="https://obr.uk/supplementary-forecast-information/">obr.uk &mdash; Supplementary Forecast Information</a></p>
<hr>
<h2 id="14-census-and-population-estimates">14. Census and Population Estimates</h2>
<p><strong>Census 2021, England and Wales</strong> &mdash; ONS Full results from the 2021 Census. Population counts by age, sex, ethnicity, religion, health, disability, housing, qualifications, occupation, and more. Available down to output area level. <a href="https://www.ons.gov.uk/census">ons.gov.uk &mdash; Census</a></p>
<p><strong>Scotland Census 2022</strong> &mdash; National Records of Scotland Scotland's census was delayed to 2022. Provides similar detail to the England and Wales census. <a href="https://www.scotlandscensus.gov.uk/">scotlandscensus.gov.uk</a></p>
<p><strong>Northern Ireland Census 2021</strong> &mdash; NISRA Census results for Northern Ireland at detailed geographic levels. <a href="https://www.nisra.gov.uk/statistics/census">nisra.gov.uk &mdash; Census</a></p>
<p><strong>Mid-Year Population Estimates</strong> &mdash; ONS Estimated population by single year of age and sex for the UK and constituent countries. The standard population denominator used across government statistics. Updated annually. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland">ons.gov.uk &mdash; Mid-Year Estimates</a></p>
<p><strong>Small Area Population Estimates</strong> &mdash; ONS Population estimates at LSOA, MSOA, and ward level. Enables very granular geographical analysis. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/lowersuperoutputareamidyearpopulationestimates">ons.gov.uk &mdash; Small Area Estimates</a></p>
<hr>
<h2 id="15-migration-and-births">15. Migration and Births</h2>
<p><strong>International Migration Statistics</strong> &mdash; ONS Long-term international migration estimates by citizenship, country of birth, and reason for migration. Now primarily based on administrative data sources. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/internationalmigration/datasets/migrationstatisticsquarterlyreportprovisionallongterminternationalmigrationltimestimates">ons.gov.uk &mdash; International Migration</a></p>
<p><strong>Birth Statistics</strong> &mdash; ONS Live births by mother's age, area, and parity. Includes total fertility rate (TFR) and age-specific fertility rates (ASFR). Important for population projection and pension scheme demographic modelling. <a href="https://www.ons.gov.uk/peoplepopulationandcommunity/birthsdeathsandmarriages/livebirths/datasets/birthsummarytables">ons.gov.uk &mdash; Birth Statistics</a></p>
<hr>
<h1 id="international-datasets">International Datasets</h1>
<h2 id="16-international-mortality-and-life-tables">16. International Mortality and Life Tables</h2>
<p><strong>Human Mortality Database (HMD)</strong> &mdash; UC Berkeley / Max Planck Institute The gold standard for international mortality research. Detailed mortality and population data for over 40 countries, with data going back centuries for some. Includes period and cohort life tables, death counts, exposures, and death rates by single year of age. Free registration required. <a href="https://www.mortality.org">mortality.org</a></p>
<p><strong>Human Life-Table Database (HLD)</strong> &mdash; Max Planck Institute / INED Collection of life tables from official national statistical offices. Broader country coverage than HMD (160+ countries, 700+ life tables) but less standardised processing. Free registration required. <a href="https://www.lifetable.de">lifetable.de</a></p>
<p><strong>US Social Security Administration &mdash; Period Life Tables</strong> &mdash; SSA US period life tables showing probability of death, survivors, and life expectancy by single year of age (0 to 119) and sex. <a href="https://www.ssa.gov/oact/STATS/table4c6.html">ssa.gov &mdash; Period Life Tables</a></p>
<p><strong>US Social Security Administration &mdash; Cohort Life Tables</strong> &mdash; SSA Cohort life tables showing historical and projected mortality for US birth cohorts. Invaluable for long-term pension and annuity valuations. <a href="https://www.ssa.gov/oact/HistEst/CohLifeTables/2020/CohLifeTables2020.html">ssa.gov &mdash; Cohort Life Tables</a></p>
<p><strong>Statistics Canada &mdash; Life Tables</strong> &mdash; Statistics Canada Complete life tables for Canada by sex at national and provincial levels. <a href="https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1310083901">statcan.gc.ca &mdash; Life Tables</a></p>
<p><strong>Australian Bureau of Statistics &mdash; Life Tables</strong> &mdash; ABS Australian life tables including state/territory breakdowns, Indigenous life tables, and trend data going back to 1881-1890. <a href="https://www.abs.gov.au/statistics/people/population/life-tables/latest-release">abs.gov.au &mdash; Life Tables</a></p>
<p><strong>WHO Mortality Database</strong> &mdash; World Health Organization Cause-of-death data reported by 120+ WHO member states, classified by age, sex, and ICD cause. The most comprehensive international source for cause-specific mortality. <a href="https://www.who.int/data/data-collection-tools/who-mortality-database">who.int &mdash; Mortality Database</a></p>
<p><strong>Eurostat &mdash; Mortality and Life Expectancy</strong> &mdash; Eurostat Life tables, life expectancy, and detailed mortality statistics for all EU/EEA member states. Accessible via Eurostat's data browser. <a href="https://ec.europa.eu/eurostat/web/population-demography/demography-population-stock-balance/database">ec.europa.eu &mdash; Eurostat Demography</a></p>
<p><strong>SOA Mortality Tables</strong> &mdash; Society of Actuaries Comprehensive library of mortality tables used in US and Canadian practice, including CSO tables, RP-2014/MP-2021 pension tables, and mortality improvement scales. The mort.soa.org tool allows table lookup, comparison, and download. <a href="https://mort.soa.org">mort.soa.org</a></p>
<hr>
<h2 id="17-insurance-and-claims-data">17. Insurance and Claims Data</h2>
<p><strong>FARS &mdash; Fatality Analysis Reporting System</strong> &mdash; NHTSA (US) Census of all fatal traffic crashes in the United States since 1975. Over 30 data elements per record, including crash circumstances, vehicles, and persons involved. <a href="https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars">nhtsa.gov &mdash; FARS</a></p>
<p><strong>CRSS &mdash; Crash Report Sampling System</strong> &mdash; NHTSA (US) Nationally representative sample of all police-reported crashes (not just fatal), covering approximately 50,000 crashes per year. Replaced the former General Estimates System (GES). <a href="https://www.nhtsa.gov/crash-data-systems/crash-report-sampling-system">nhtsa.gov &mdash; CRSS</a></p>
<p><strong>NAIC Insurance Data</strong> &mdash; National Association of Insurance Commissioners (US) Aggregate insurance market data including market share reports, profitability by line of business, and state-level premium data. Some reports are freely available. <a href="https://content.naic.org/cipr-topics/statistical-data">naic.org &mdash; Statistical Data</a></p>
<p><strong>APRA Insurance Statistics</strong> &mdash; Australian Prudential Regulation Authority Quarterly and annual statistics on the Australian insurance industry: general insurance (premium, claims, combined ratios by class), life insurance, and private health insurance. Individual insurer-level data also available. <a href="https://www.apra.gov.au/quarterly-general-insurance-statistics">apra.gov.au &mdash; Insurance Statistics</a></p>
<p><strong>EM-DAT International Disaster Database</strong> &mdash; CRED, Universite catholique de Louvain Comprehensive database of natural and technological disasters worldwide since 1900. Over 26,000 disasters with data on deaths, injuries, affected population, and economic damages. Free registration required. <a href="https://www.emdat.be">emdat.be</a></p>
<p><strong>NOAA Storm Events Database</strong> &mdash; NOAA (US) Records of significant weather events in the US from 1950 to present: tornadoes, hail, floods, hurricanes, and winter storms. Includes property damage estimates and fatalities. Over 48 event types tracked. <a href="https://www.ncei.noaa.gov/stormevents/">ncei.noaa.gov &mdash; Storm Events</a></p>
<p><strong>IBTrACS &mdash; International Best Track Archive</strong> &mdash; NOAA The most complete global collection of tropical cyclone track data, merging data from all regional meteorological agencies. Includes position, intensity, wind radii, and pressure for every known tropical cyclone. <a href="https://www.ncei.noaa.gov/products/international-best-track-archive">ncei.noaa.gov &mdash; IBTrACS</a></p>
<p><strong>Insurance Information Institute Facts and Statistics</strong> &mdash; III (US) Free aggregate statistics on the US insurance industry covering auto, home, commercial lines, life, and health. Historical loss data and catastrophe loss summaries. <a href="https://www.iii.org/facts-statistics">iii.org &mdash; Facts and Statistics</a></p>
<p><strong>CAS Loss Reserving Database</strong> &mdash; Casualty Actuarial Society Loss development triangles from NAIC Schedule P filings for multiple lines (workers comp, commercial auto, medical malpractice, other liability, private passenger auto, product liability). Widely used in academic research and reserving education. <a href="https://www.casact.org/publications-research/research/research-resources/loss-reserving-data-pulled-naic-schedule-p">casact.org &mdash; Loss Reserving Data</a></p>
<hr>
<h2 id="18-international-health-data">18. International Health Data</h2>
<p><strong>CDC WONDER</strong> &mdash; US Centers for Disease Control and Prevention Wide-ranging US public health datasets including detailed mortality by cause, age, race, and geography. Also covers natality, cancer statistics, environmental data, and vaccine adverse events. <a href="https://wonder.cdc.gov">wonder.cdc.gov</a></p>
<p><strong>NHANES &mdash; National Health and Nutrition Examination Survey</strong> &mdash; CDC (US) Combines interviews and physical examinations covering demographics, dietary habits, health conditions, and biomarker data. Unique for providing objectively measured health data. Approximately 5,000 persons examined per year. <a href="https://www.cdc.gov/nchs/nhanes/index.htm">cdc.gov &mdash; NHANES</a></p>
<p><strong>NHIS &mdash; National Health Interview Survey</strong> &mdash; CDC (US) Principal source on the health of the US civilian population. Covers health status, health care access, insurance coverage, immunisation, and health behaviours. Approximately 35,000 households per year. <a href="https://www.cdc.gov/nchs/nhis/index.htm">cdc.gov &mdash; NHIS</a></p>
<p><strong>MEPS &mdash; Medical Expenditure Panel Survey</strong> &mdash; AHRQ (US) Comprehensive data on health care use, expenditures, payment sources, and insurance coverage. Uniquely links medical conditions to specific costs. <a href="https://meps.ahrq.gov">meps.ahrq.gov</a></p>
<p><strong>WHO Global Health Observatory</strong> &mdash; World Health Organization Over 1,000 health indicators across all 194 member states: life expectancy, disease burden, risk factors, health systems, and expenditure. <a href="https://www.who.int/data/gho">who.int &mdash; GHO</a></p>
<p><strong>WHO Global Health Expenditure Database</strong> &mdash; WHO Internationally comparable health spending data for 190+ countries. Government, private, and out-of-pocket expenditure as shares of GDP and per capita. <a href="https://apps.who.int/nha/database">apps.who.int &mdash; GHED</a></p>
<p><strong>OECD Health Statistics</strong> &mdash; OECD Comparative data on health systems across 38 OECD countries: health status, resources, utilisation, pharmaceutical markets, and expenditure. <a href="https://stats.oecd.org">stats.oecd.org</a></p>
<p><strong>Global Burden of Disease (GBD)</strong> &mdash; IHME, University of Washington Estimates of mortality and disability from hundreds of diseases, injuries, and risk factors worldwide. Covers 204 countries, 369 diseases/injuries, and 87 risk factors. <a href="https://vizhub.healthdata.org/gbd-results/">vizhub.healthdata.org &mdash; GBD Results</a></p>
<p><strong>CIHI &mdash; Canadian Institute for Health Information</strong> Data on Canadian health system performance including hospital outcomes, wait times, health spending, workforce, and patient safety. <a href="https://www.cihi.ca/en/access-data-and-reports">cihi.ca &mdash; Data and Reports</a></p>
<p><strong>AIHW &mdash; Australian Institute of Health and Welfare</strong> Australia's national health and welfare statistics: health expenditure, disease burden, hospital statistics, mental health, aged care, and disability. <a href="https://www.aihw.gov.au/reports-data">aihw.gov.au &mdash; Reports and Data</a></p>
<p><strong>Eurostat Health Database</strong> &mdash; Eurostat European health statistics covering causes of death, healthcare expenditure, resources, morbidity (hospital discharges by diagnosis), and health determinants. Standardised across EU member states. <a href="https://ec.europa.eu/eurostat/web/health/overview">ec.europa.eu &mdash; Eurostat Health</a></p>
<hr>
<h2 id="19-international-demographics-and-population">19. International Demographics and Population</h2>
<p><strong>US Census Bureau</strong> &mdash; United States Census Bureau The definitive source for US population data. Decennial census results, American Community Survey (ACS) annual estimates, population projections, housing data, and economic census. Data available down to block group level. <a href="https://data.census.gov">data.census.gov</a></p>
<p><strong>US Population Projections</strong> &mdash; US Census Bureau National and state population projections by age, sex, race, and Hispanic origin. Base, high, and low variants. <a href="https://www.census.gov/programs-surveys/popproj.html">census.gov &mdash; Population Projections</a></p>
<p><strong>Statistics Canada &mdash; Census and Population</strong> &mdash; Statistics Canada Comprehensive Canadian demographic data: census results (every 5 years), population estimates, projections, immigration, fertility, and household composition. <a href="https://www12.statcan.gc.ca/census-recensement/index-eng.cfm">statcan.gc.ca &mdash; Census</a></p>
<p><strong>Australian Bureau of Statistics &mdash; Population</strong> &mdash; ABS Australian population statistics: census results (every 5 years), estimated resident population, projections, migration, births, deaths, and marriages. <a href="https://www.abs.gov.au/statistics/people/population">abs.gov.au &mdash; Population</a></p>
<p><strong>Eurostat Population and Demography</strong> &mdash; Eurostat Comprehensive demographic data for all EU/EEA countries: population by age and sex, fertility, mortality, migration, household composition, and EUROPOP projections. <a href="https://ec.europa.eu/eurostat/web/population-demography">ec.europa.eu &mdash; Eurostat Population</a></p>
<p><strong>UN World Population Prospects</strong> &mdash; UN DESA The authoritative source for global demographic estimates and projections. Every country from 1950 to 2100. Fertility, mortality, migration assumptions with multiple scenarios. The 2024 Revision is the latest. <a href="https://population.un.org/wpp/">population.un.org &mdash; WPP</a></p>
<p><strong>UN World Urbanization Prospects</strong> &mdash; UN DESA Urban and rural population estimates and projections for all countries, 1950 to 2050. Includes data for individual cities and urban agglomerations. <a href="https://population.un.org/wup/">population.un.org &mdash; WUP</a></p>
<hr>
<h2 id="20-international-finance-and-economics">20. International Finance and Economics</h2>
<p><strong>FRED &mdash; Federal Reserve Economic Data</strong> &mdash; Federal Reserve Bank of St. Louis Over 800,000 time series covering interest rates (Treasury yields, SOFR), inflation (CPI, PCE), GDP, employment, housing, exchange rates, and international data. One of the most valuable free economic data resources in the world. <a href="https://fred.stlouisfed.org">fred.stlouisfed.org</a></p>
<p><strong>US Bureau of Labor Statistics</strong> &mdash; BLS Primary source for US inflation and employment statistics. CPI at detailed item level, PPI, Employment Cost Index, occupational wages, workplace injuries/fatalities, and productivity data. <a href="https://www.bls.gov/data/">bls.gov &mdash; Data</a></p>
<p><strong>US Bureau of Economic Analysis</strong> &mdash; BEA GDP and national accounts data, personal income by state, and international trade statistics. <a href="https://www.bea.gov/data">bea.gov &mdash; Data</a></p>
<p><strong>US Treasury Interest Rate Data</strong> &mdash; US Department of the Treasury Daily Treasury yield curve rates, bill rates, and real yield curve rates (TIPS). The foundation for US discount rate curves in pension and insurance valuations. <a href="https://home.treasury.gov/resource-center/data-chart-center/interest-expense/interest-rate-statistics">home.treasury.gov &mdash; Interest Rate Statistics</a></p>
<p><strong>World Bank Open Data</strong> &mdash; World Bank Over 1,400 development indicators covering GDP, poverty, health, education, infrastructure, and financial sector data for 217 economies. Includes insurance penetration/density data. <a href="https://data.worldbank.org">data.worldbank.org</a></p>
<p><strong>IMF Data</strong> &mdash; International Monetary Fund International Financial Statistics, World Economic Outlook data, Balance of Payments, Government Finance Statistics, and Financial Soundness Indicators for 190 member countries. <a href="https://data.imf.org">data.imf.org</a></p>
<p><strong>OECD Economic Data</strong> &mdash; OECD Economic data for 38 OECD countries: GDP, inflation, interest rates, unemployment, trade, productivity, and income inequality. The OECD Economic Outlook provides biannual forecasts. <a href="https://data.oecd.org">data.oecd.org</a></p>
<p><strong>ECB Statistical Data Warehouse</strong> &mdash; European Central Bank Euro area and EU financial statistics: yield curves (government and corporate), money market rates (ESTR), bank lending rates, exchange rates, and financial stability indicators. ECB yield curves are essential for Solvency II discount rate calculations. <a href="https://sdw.ecb.europa.eu">sdw.ecb.europa.eu</a></p>
<p><strong>Bank of Canada Financial Data</strong> &mdash; Bank of Canada Canadian interest rates, bond yields, exchange rates, and inflation data. Includes historical Government of Canada benchmark bond yields. <a href="https://www.bankofcanada.ca/rates/">bankofcanada.ca &mdash; Rates</a></p>
<p><strong>RBA Statistical Tables</strong> &mdash; Reserve Bank of Australia Australian interest rates, bond yields, exchange rates, and economic indicators. Includes Commonwealth Government securities yields. <a href="https://www.rba.gov.au/statistics/">rba.gov.au &mdash; Statistics</a></p>
<p><strong>US Federal Student Aid Data</strong> &mdash; US Department of Education Federal student loan portfolio data: outstanding balances by loan type, repayment status, delinquency and default rates, and borrower demographics. <a href="https://studentaid.gov/data-center/student/portfolio">studentaid.gov &mdash; Data Center</a></p>
<hr>
<h2 id="21-pensions-and-social-security">21. Pensions and Social Security</h2>
<p><strong>SSA Actuarial Publications</strong> &mdash; US Social Security Administration Comprehensive actuarial data on the US Social Security system. The annual Trustees Report provides 75-year financial projections, mortality tables, disability rates, and demographic projections. <a href="https://www.ssa.gov/oact/">ssa.gov &mdash; Office of the Chief Actuary</a></p>
<p><strong>SSA Disability Experience Data</strong> &mdash; SSA Disability insurance programme experience: incidence rates by age and sex, termination rates, and prevalence rates. <a href="https://www.ssa.gov/oact/STATS/dibStat.html">ssa.gov &mdash; DI Statistics</a></p>
<p><strong>PBGC Data Books</strong> &mdash; Pension Benefit Guaranty Corporation (US) Data on US defined benefit plans insured by PBGC: plan counts, participants, funding levels, premiums, and termination data. <a href="https://www.pbgc.gov/prac/data-books">pbgc.gov &mdash; Data Books</a></p>
<p><strong>Form 5500 Filings</strong> &mdash; US Department of Labor Annual return/report data for approximately 800,000 US employee benefit plans. Plan financial information, participant counts, funding data, and service provider fees. <a href="https://www.dol.gov/agencies/ebsa/researchers/data/form-5500">dol.gov &mdash; Form 5500</a></p>
<p><strong>CPP Actuarial Reports</strong> &mdash; Office of the Chief Actuary, OSFI (Canada) Triennial actuarial reports on the Canada Pension Plan with 75-year financial projections, demographic and economic assumptions, and sensitivity analysis. <a href="https://www.osfi-bsif.gc.ca/en/office-chief-actuary/actuarial-reports/actuarial-report-30th-canada-pension-plan">osfi-bsif.gc.ca &mdash; CPP Reports</a></p>
<p><strong>CPP Investments Reports</strong> &mdash; CPP Investments (Canada) Quarterly and annual reports on CPP fund investment performance and asset allocation. <a href="https://www.cppinvestments.com/the-fund/our-performance/financial-results">cppinvestments.com &mdash; Financial Results</a></p>
<p><strong>APRA Superannuation Statistics</strong> &mdash; APRA (Australia) Comprehensive data on Australian superannuation funds: total assets, fund flows, asset allocation, investment performance, membership, and benefit payments. Individual fund-level data available. <a href="https://www.apra.gov.au/quarterly-superannuation-statistics">apra.gov.au &mdash; Superannuation Statistics</a></p>
<p><strong>OECD Pensions Data</strong> &mdash; OECD Cross-country pension data: fund assets, contributions, benefits, replacement rates, retirement ages, and investment allocation. "Pensions at a Glance" provides comparative analysis. <a href="https://stats.oecd.org">stats.oecd.org</a></p>
<p><strong>EIOPA Data</strong> &mdash; European Insurance and Occupational Pensions Authority Solvency II risk-free interest rate term structures (published monthly), EU insurance market statistics, and occupational pension statistics. The risk-free rate curves are mandatory regulatory data for European insurers. <a href="https://www.eiopa.europa.eu/tools-and-data_en">eiopa.europa.eu &mdash; Tools and Data</a></p>
<hr>
<h2 id="22-catastrophe-and-climate-data">22. Catastrophe and Climate Data</h2>
<p><strong>NOAA Climate Data</strong> &mdash; NOAA National Centers for Environmental Information Historical temperature, precipitation, extreme weather, sea level, and Arctic/Antarctic data. Climate Data Online provides station-level observations. Also produces the "Billion-Dollar Weather and Climate Disasters" dataset. <a href="https://www.ncei.noaa.gov">ncei.noaa.gov</a></p>
<p><strong>USGS Earthquake Data</strong> &mdash; United States Geological Survey Real-time and historical earthquake data worldwide. Comprehensive catalog with magnitude, location, depth, and shakemap data. Also produces seismic hazard maps. <a href="https://earthquake.usgs.gov/earthquakes/">earthquake.usgs.gov</a></p>
<p><strong>Munich Re NatCatSERVICE</strong> &mdash; Munich Re Aggregate natural catastrophe loss data including annual summaries, event counts, and trend analyses. The annual "Natural Catastrophe Review" is publicly available and widely cited. <a href="https://www.munichre.com/en/solutions/for-industry-clients/natcatservice.html">munichre.com &mdash; NatCatSERVICE</a></p>
<p><strong>Swiss Re sigma</strong> &mdash; Swiss Re Institute Global catastrophe loss data and insurance market statistics via the sigma explorer. Complements Munich Re's NatCatSERVICE with independent estimates. <a href="https://sigma.swissre.com">sigma.swissre.com</a></p>
<hr>
<h2 id="23-additional-specialist-sources">23. Additional Specialist Sources</h2>
<p><strong>SOA Experience Studies</strong> &mdash; Society of Actuaries Industry experience studies covering mortality, morbidity, lapse/persistency, and annuity experience. Many provide detailed data tables. <a href="https://www.soa.org/resources/experience-studies/">soa.org &mdash; Experience Studies</a></p>
<p><strong>CIA Research</strong> &mdash; Canadian Institute of Actuaries Research papers and some experience data relevant to Canadian actuarial practice. Many research documents are publicly accessible. <a href="https://www.cia-ica.ca/publications/research">cia-ica.ca &mdash; Publications</a></p>
<p><strong>Actuaries Institute Australia &mdash; Knowledge Bank</strong> Green papers, white papers, and public-interest research including the Australian Actuaries Climate Index. <a href="https://www.actuaries.asn.au/knowledge-bank">actuaries.asn.au &mdash; Knowledge Bank</a></p>
<p><strong>ILO Social Protection Data</strong> &mdash; International Labour Organization World Social Protection Database covering pension, health, unemployment, disability, and maternity programmes for all ILO member states. ILOSTAT provides labour statistics. <a href="https://ilostat.ilo.org">ilostat.ilo.org</a></p>
<p><strong>NBER Business Cycle Dating</strong> &mdash; National Bureau of Economic Research The official chronology of US business cycles (peaks and troughs) since 1854. The definitive reference for recession dating. <a href="https://www.nber.org/research/data/us-business-cycle-expansions-and-contractions">nber.org &mdash; Business Cycles</a></p>
<p><strong>NCCI Workers Compensation Research</strong> &mdash; NCCI (US) Free research including the annual "State of the Line" report, industry financial results, and frequency/severity trends for workers compensation. <a href="https://www.ncci.com/Articles/Pages/Insights-Research.aspx">ncci.com &mdash; Research</a></p>
<hr>
<h2 id="24-quick-reference-by-actuarial-specialty">24. Quick Reference by Actuarial Specialty</h2>
<table>
<thead>
<tr>
<th>Specialty</th>
<th>Key Datasets</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Life Insurance</strong></td>
<td>National Life Tables (ONS), HMD, Weekly Deaths, Cancer Registration, Cancer Survival, Health Survey for England, ASHE, SOA mort.soa.org, SSA Life Tables, CDC WONDER</td>
</tr>
<tr>
<td><strong>Pensions</strong></td>
<td>National Life Tables, Population Projections, OPSS, TPR Scheme Returns, ASHE, CPI/RPI, BoE Yield Curves, Gilt Data, Stat-Xplore, SSA Actuarial Publications, PBGC, OECD Pensions</td>
</tr>
<tr>
<td><strong>General Insurance (Motor)</strong></td>
<td>STATS19, Road Traffic Statistics, MOT Test Data, Police Recorded Crime, FARS, CRSS</td>
</tr>
<tr>
<td><strong>General Insurance (Property)</strong></td>
<td>EA Flood Maps, HadUK-Grid, UKCP, Land Registry Price Paid, EPC Data, Police Recorded Crime, NOAA Storm Events, EM-DAT</td>
</tr>
<tr>
<td><strong>Health / PMI</strong></td>
<td>Health Survey for England, HES, QOF Prevalence, Cancer Statistics, Fingertips, WHO GHO, GBD, CDC WONDER, NHANES, MEPS</td>
</tr>
<tr>
<td><strong>Critical Illness</strong></td>
<td>Cancer Registration, Cancer Survival, Cause of Death Data, QOF Prevalence, GBD, SOA Experience Studies</td>
</tr>
<tr>
<td><strong>Investment</strong></td>
<td>BoE Yield Curves, DMO Gilt Data, CPI/RPI, Bank Rate, FRED, ECB SDW, US Treasury Yields, OECD Economic, IMF Data</td>
</tr>
<tr>
<td><strong>Catastrophe / Reinsurance</strong></td>
<td>EM-DAT, NOAA Storm Events, IBTrACS, USGS Earthquakes, Munich Re NatCat, Swiss Re sigma, EA Flood Maps, UKCP</td>
</tr>
<tr>
<td><strong>Demographic / Longevity</strong></td>
<td>HMD, National Life Tables, Census 2021, Mid-Year Population Estimates, Population Projections, UN WPP, Birth Statistics, Migration</td>
</tr>
<tr>
<td><strong>Climate / ESG</strong></td>
<td>Met Office UKCP, HadUK-Grid, EA Flood Maps, EPC Data, NOAA NCEI, USGS</td>
</tr>
<tr>
<td><strong>ERM</strong></td>
<td>FRED, IMF WEO, OECD Economic, NBER Business Cycles, World Bank, BLS</td>
</tr>
</tbody>
</table>
<hr>
<h2 id="25-multi-domain-data-portals">25. Multi-Domain Data Portals</h2>
<p>These portals are gateways to many of the individual datasets listed above, and much more besides. Worth bookmarking as starting points.</p>
<p><strong>data.gov.uk</strong> &mdash; The UK Government's open data portal. Searchable catalogue of thousands of datasets across central and local government. <a href="https://www.data.gov.uk/">data.gov.uk</a></p>
<p><strong>ONS</strong> &mdash; The primary portal for UK population, economic, and social statistics. Topic-based navigation and expanding API access. <a href="https://www.ons.gov.uk/">ons.gov.uk</a></p>
<p><strong>NOMIS</strong> &mdash; Labour market, population, and mortality statistics with flexible query tools. Particularly strong for area-based analysis. <a href="https://www.nomisweb.co.uk/">nomisweb.co.uk</a></p>
<p><strong>UK Data Service</strong> &mdash; Access to survey microdata including the Family Resources Survey, Health Survey for England, and Labour Force Survey. Free registration required for most datasets. <a href="https://ukdataservice.ac.uk/">ukdataservice.ac.uk</a></p>
<p><strong>Stat-Xplore</strong> &mdash; DWP benefits statistics including State Pension, Universal Credit, PIP, and Attendance Allowance. Free registration required. <a href="https://stat-xplore.dwp.gov.uk/">stat-xplore.dwp.gov.uk</a></p>
<hr>
<h2 id="26-tips-for-working-with-these-datasets">26. Tips for Working with These Datasets</h2>
<ol>
<li>
<p><strong>Combine exposure and event data.</strong> Use Mid-Year Population Estimates as denominators with death registration data as numerators to calculate mortality rates. Use road traffic statistics as exposure when analysing STATS19 accident data.</p>
</li>
<li>
<p><strong>Geography matters.</strong> Many UK datasets use standard geographical classifications (LSOA, MSOA, local authority, region). The ONS Open Geography Portal at <a href="https://geoportal.statistics.gov.uk/">geoportal.statistics.gov.uk</a> provides boundary files and lookup tables to link these.</p>
</li>
<li>
<p><strong>Check reference periods.</strong> Different datasets use different time bases: calendar year, financial year, mid-year to mid-year. Always check the metadata before joining datasets.</p>
</li>
<li>
<p><strong>Use APIs where available.</strong> FRED, Eurostat, the World Bank, IMF, Census Bureau, and many others offer well-documented APIs. The ONS is expanding its API offering via <a href="https://developer.ons.gov.uk/">developer.ons.gov.uk</a>. Programmatic access improves reproducibility.</p>
</li>
<li>
<p><strong>Watch for registration requirements.</strong> HMD, HLD, EM-DAT, EPC data, Stat-Xplore, and UK Data Service all require free registration before download. Most other sources allow immediate access.</p>
</li>
<li>
<p><strong>Data lag varies.</strong> Most government statistical datasets have a 1-3 year lag between the reference period and availability. Financial market data (FRED, ECB, Treasury yields) is typically available with minimal lag.</p>
</li>
</ol>
<hr>
<h2 id="found-this-useful">Found this useful?</h2>
<p>I'll keep this list updated as new sources emerge. If you know of a free public dataset that should be on this list, get in touch at <a href="https://inqa.group">INQA Group</a> &mdash; I'd love to hear what data sources you use in your work.</p>
<p>INQA Group is a community for actuaries who want to work smarter with AI and modern tools. If that sounds like you, <a href="https://inqa.group">take a look</a>.</p>
<hr>
<p><em>Last updated: February 2026</em> <em>Compiled by Patrick Lee, Founder, INQA Group</em></p>]]></content:encoded></item><item><title>White collar workers: it has never been more important to increase your productivity by a multiple!</title><link>https://pjlee.net/blog/white-collar-workers-it-has-never-been-more-important-to-increase-your-productivity-by-a-multiple</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 28 Feb 2026 20:48:36 +0000</pubDate><guid>https://pjlee.net/blog/white-collar-workers-it-has-never-been-more-important-to-increase-your-productivity-by-a-multiple</guid><description>AI is coming for most white-collar jobs. Blue-collar too, but it will take longer because of the delay before hundreds of millions of robots can be manufactured.
So it is now vital for you to use AI to increase your productivity by a multiple.</description><content:encoded><![CDATA[<p>Further to <a href="https://pjlee.net/blog/ai-agents-very-important-in-2025">https://pjlee.net/blog/ai-agents-very-important-in-2025</a></p>
<p>my experience of intensive use of AI during 2025, and especially so far during 2026 (because the pace of improvement has accelerated!) is that AI is coming for white-collar jobs faster than predicted.&nbsp; Blue-collar jobs too, but it will take longer to mass manufacture hundreds of millions of robots.&nbsp;&nbsp;</p>
<p>Producing AI agents is much much quicker.&nbsp;</p>
<p>So within perhaps 2 years at most, AI looks likely to be able to do almost all white collar work.&nbsp; There will be exceptions, but those look likely to be temporary: e.g.</p>
<ul>
<li>people with specialist knowledge of a company's clients, data and systems (the AI will catch up eventually)</li>
<li>people with roles mandated by regulation (regulators will be slow to act, but eventually will realise that AI will eventually be capable of doing a better job).</li>
</ul>
<p>Many employers will be slow to react at first.&nbsp; But the pressure not to recruit new humans (unless a strong business case can be made that the work can't be done by existing employees augmented with AI) will grow.&nbsp; Employers that fail to adapt are likely to find that competitors outpace them.</p>
<p>So what should you do?&nbsp;</p>
<p>Use AI to increase your productivity by a multiple.</p>
<p>That's what I have been working on over the past year. I have achieved it in several areas (most spectacularly in coding) and have been building a system that increases my productivity every day.</p>
<p></p>
<p>There are big societal issues coming too: as I put in a newsletter to International Qualified Actuaries Group members recently:</p>
<p>"We're heading toward an agentic world where AI agents can do most white-collar work within 2 years. Productivity becomes very high, products become cheap &mdash; but far fewer people work, including actuaries. Regulatory inertia will protect some temporarily, but not indefinitely.</p>
<p>The disruption goes deeper: What do pensions look like when lifespans extend but careers shorten? What's insurance's role with abundant goods but scarce employment? How do we finance universal basic income when traditional tax bases collapse? What's the point of professional exams when AI can do the work?"</p>]]></content:encoded></item><item><title>Site and associated function upgraded to .NET 10</title><link>https://pjlee.net/blog/site-and-associated-function-upgraded-to-net-10</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 28 Feb 2026 20:16:08 +0000</pubDate><guid>https://pjlee.net/blog/site-and-associated-function-upgraded-to-net-10</guid><description>I have upgraded the site from .NET 9 and the associated function from .NET 8 to .NET 10.</description><content:encoded><![CDATA[<p>Further to <a href="https://pjlee.net/blog/upgraded-this-site-to-net-9-but-not-the-associate-function-it-seems-that-net-9-cannot-be-used-with-f">https://pjlee.net/blog/upgraded-this-site-to-net-9-but-not-the-associate-function-it-seems-that-net-9-cannot-be-used-with-f</a>,&nbsp;I have upgraded the site from .NET 9 and the associated function from .NET 8 to .NET 10.&nbsp;&nbsp;</p>
<p>The process was relatively straightforward: as well as changing the .csproj files, I also had to upgrade various Microsoft nuget packages. Note that for the function I couldn't upgrade&nbsp;Microsoft.ApplicationInsights.WorkerService to 3.0.0 but only to 2.22.0 because it seems that the .NET 10 functions are not yet compatible with Microsoft.ApplicationInsights.WorkerService 3.0.0.</p>]]></content:encoded></item><item><title>AI Agents: very important in 2025</title><link>https://pjlee.net/blog/ai-agents-very-important-in-2025</link><media:content medium="image" url="https://cdn.buttercms.com/XcSVN4EZT0ef8dgKizVO" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 01 Feb 2025 21:07:00 +0000</pubDate><guid>https://pjlee.net/blog/ai-agents-very-important-in-2025</guid><description>I've been exploring AI Agents recently and they look extremely promising.  More on this in due course.</description><content:encoded><![CDATA[<p>I've been exploring AI Agents recently and they look extremely promising.</p>
<p>At the moment (unless something else supplants them - not impossible given the pace of progress in AI) I think they will have a massive impact in 2025.</p>]]></content:encoded></item><item><title>Using Oqtane  (an application framework in .NET 9 and Blazor)</title><link>https://pjlee.net/blog/using-oqtane-an-application-framework-in-net-9-and-blazor</link><media:content medium="image" url="https://cdn.buttercms.com/7TRmriQCRyuLFuxKSPoY" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 01 Feb 2025 21:03:00 +0000</pubDate><guid>https://pjlee.net/blog/using-oqtane-an-application-framework-in-net-9-and-blazor</guid><description>I've been experimenting a lot using Oqtane over the last 2 months and like it quite a lot.</description><content:encoded><![CDATA[<p>I've been experimenting a lot using <a href="https://www.oqtane.org/" rel="follow">Oqtane</a> over the last 2 months and like it quite a lot.</p>]]></content:encoded></item><item><title>Upgraded this site to .NET 9 (but not the associate function: it seems that .NET 9 cannot be used with functions yet!)</title><link>https://pjlee.net/blog/upgraded-this-site-to-net-9-but-not-the-associate-function-it-seems-that-net-9-cannot-be-used-with-f</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 27 Nov 2024 17:50:00 +0000</pubDate><guid>https://pjlee.net/blog/upgraded-this-site-to-net-9-but-not-the-associate-function-it-seems-that-net-9-cannot-be-used-with-f</guid><description>I upgraded this website to .NET9 at the weekend. That was straightforward, I just had to update Visual Studio 2022 to the latest version and then upgrading the site amounted to just changing the target in its project file.
I also tried upgrading the associated function, but it seems (as too often with Microsoft releases) that .NET 9 is not yet really fully available.  It doesn't work with functions yet!</description><content:encoded><![CDATA[<p>Further to <a href="https://pjlee.net/blog/upgraded-this-site-and-associated-function-to-net-8" rel="follow">this post</a>, I upgraded this website to .NET9 at the weekend. That was straightforward, I just had to update Visual Studio 2022 to the latest version and then upgrading the site amounted to just changing the target in its project file.</p>
<p>I also tried upgrading the associated function, but it seems (as too often with Microsoft releases) that .NET 9 is not yet really fully available. &nbsp;It doesn't work with functions yet:</p>
<p>I tried increasing the version of the function to .NET 9 but I got a compile error:</p>
<p>"Invalid combination of TargetFramework and AzureFunctionsVersion is set."</p>
<p>I tried increasing the function version from 4 but 4 seems to be the highest currently available version.</p>
<p><strong>So it seems that functions can't yet be upgraded to .NET 9.</strong></p>]]></content:encoded></item><item><title>Are you ready to improve your actuarial membership experience?</title><link>https://pjlee.net/blog/are-you-ready-to-improve-your-actuarial-membership-experience</link><media:content medium="image" url="https://cdn.buttercms.com/knjTigegRP6gCfj4WWYw" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 05 Nov 2024 23:26:00 +0000</pubDate><guid>https://pjlee.net/blog/are-you-ready-to-improve-your-actuarial-membership-experience</guid><description>Are you an IFoA (Institute and Faculty of Actuaries) Fellow or Associate? Are you ready to take the first step to improve your actuarial membership experience? Join the waitlist</description><content:encoded><![CDATA[<p><span data-text="true">Are you an IFoA (Institute and Faculty of Actuaries) Fellow or Associate?&nbsp; Are you ready to take the first step to improve your actuarial membership experience?</span></p>
<p><a href="https://scorecard.inqa.com/neworg-1" class="btn btn-primary">Learn more</a></p>]]></content:encoded></item><item><title>A big thank you to all the actuaries who have registered interest so far!</title><link>https://pjlee.net/blog/a-big-thank-you-to-all-the-actuaries-who-have-registered-interest-so-far</link><media:content medium="image" url="https://cdn.buttercms.com/3Aq1NGAUT2e6yYgs4xMw" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 29 Oct 2024 21:58:04 +0000</pubDate><guid>https://pjlee.net/blog/a-big-thank-you-to-all-the-actuaries-who-have-registered-interest-so-far</guid><description>A big thank you to all the actuaries who registered interest in NewOrg or the Actuaries Student Union yesterday or today. I'm currently collating and analysing results from the answers to the questions, but hope to get in touch with each of you individually later this week. For IFoA Qualified ...</description><content:encoded><![CDATA[<p>A big thank you to all the actuaries who registered interest in NewOrg or the Actuaries Student Union yesterday or today. I'm currently collating and analysing results from the answers to the questions, but hope to get in touch with each of you individually later this week. <br><br>For IFoA Qualified actuaries (Fellows and Associates):</p>
<p><a href="https://scorecard.inqa.com/neworg-1">https://scorecard.inqa.com/neworg-1</a></p>
<p>For IFoA students:</p>
<p><a href="https://scorecard.inqa.com/students-union-1">https://scorecard.inqa.com/students-union-1</a></p>]]></content:encoded></item><item><title>Change is coming for IFoA actuaries: registration is now open for New Org and the (IFoA) Actuaries Student Union</title><link>https://pjlee.net/blog/change-is-coming-for-ifoa-actuaries-registration-is-now-open-for-new-org-and-the-ifoa-actuaries-stud</link><media:content medium="image" url="https://cdn.buttercms.com/3Aq1NGAUT2e6yYgs4xMw" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 28 Oct 2024 21:00:00 +0000</pubDate><guid>https://pjlee.net/blog/change-is-coming-for-ifoa-actuaries-registration-is-now-open-for-new-org-and-the-ifoa-actuaries-stud</guid><description>(This is a follow up to this previous article .) For IFoA qualified actuaries (Fellows and Associates), including those who left the IFoA A new actuarial organisation, with better value for money and less controlling Are you an actuary looking for a new organization that avoids regulatory overreach, values transparency, ...</description><content:encoded><![CDATA[<p>(This is a follow up to <a href="https://pjlee.net/blog/has-the-institute-and-faculty-of-actuaries-gone-too-far-meanwhile-neworg-is-being-setup"></a><a href="https://pjlee.net/blog/has-the-institute-and-faculty-of-actuaries-gone-too-far-meanwhile-neworg-is-being-setup" rel="follow">this previous article</a>.)</p>
<h1 id="ember3607">For IFoA qualified actuaries (Fellows and Associates), including those who left the IFoA</h1>
<p id="ember3608"></p>
<div>
<figure>
<div>
<div><img style="height: auto; width: 632.001px;" id="ember3609" alt="" loading="lazy" src="https://media.licdn.com/dms/image/v2/D4E12AQEfiRAx93ULHg/article-inline_image-shrink_1500_2232/article-inline_image-shrink_1500_2232/0/1730145332219?e=1735776000&amp;v=beta&amp;t=B5KhAhK_9WBQ2jKf1ncB6MTC1PtYLJ7_hiABkk-mHwk"></div>
</div>
<figcaption>A new actuarial organisation, with better value for money and less controlling</figcaption>
</figure>
</div>
<p id="ember3610">Are you an actuary looking for a new organization that avoids regulatory overreach, values transparency, network opportunities, and offers great value for money? Look no further! Join us in shaping a new future for current IFoA members by sharing your views and preferences. Take our quick quiz to join the waitlist and let your voice be heard: <a data-test-app-aware-link="" href="https://scorecard.inqa.com/neworg-1" target="_self">https://scorecard.inqa.com/neworg-1</a></p>
<p id="ember3611">#actuaries #competition #valueformoney #transparency</p>
<p id="ember3612"></p>
<h1 id="ember3613">For IFoA students</h1>
<p id="ember3614"></p>
<div>
<figure>
<section>
<div><button type="button" aria-label="This image has content credentials." id="content-credentials"></button><label aria-hidden="true" for="content-credentials">See content credentials</label></div>
</section>
<div>
<div><img style="height: auto; width: 632.001px;" id="ember3615" alt="Join the Actuaries' Student Union" loading="lazy" src="https://media.licdn.com/dms/image/v2/D4E12AQFWip0NOPC93Q/article-inline_image-shrink_1000_1488/article-inline_image-shrink_1000_1488/0/1730145445693?e=1735776000&amp;v=beta&amp;t=msGSFr8YQ8vaGH6MZ92DouJfNNO73TBPOgzTECZCP1k"></div>
</div>
<figcaption>Join the Actuaries' Student Union to address the current significant power imbalance with the IFoA</figcaption>
</figure>
</div>
<p id="ember3616">Take our quiz to join the Actuaries Student Union Waitlist and share your thoughts on value for money, network, control, study, and representation! Click here to get started: <a data-test-app-aware-link="" href="https://scorecard.inqa.com/students-union-1" target="_self">https://scorecard.inqa.com/students-union-1</a> #Actuaries #StudentUnion #Quiz</p>
<p id="ember3617">(<em>Students from other actuarial bodies, membership might also in due course be useful for you, but the Union will focus initially on meeting the needs of IFoA students</em>).</p>
<p id="ember3618">#actuaries #competition #valueformoney #education #union</p>]]></content:encoded></item><item><title>Has the Institute and Faculty of Actuaries gone too far?  Meanwhile NewOrg is being set up</title><link>https://pjlee.net/blog/has-the-institute-and-faculty-of-actuaries-gone-too-far-meanwhile-neworg-is-being-setup</link><media:content medium="image" url="https://cdn.buttercms.com/knjTigegRP6gCfj4WWYw" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 27 Oct 2024 23:43:00 +0000</pubDate><guid>https://pjlee.net/blog/has-the-institute-and-faculty-of-actuaries-gone-too-far-meanwhile-neworg-is-being-setup</guid><description>(This is a follow up to this previous article. on LinkedIn and here on this blog.) Is the Institute and Faculty of Actuaries (IFoA) going too far with its regulation of members? There has been a very active public debate here on LinkedIn over the past week see e.g. https://www.linkedin.com/posts/paulteggin_actuaries-code-dei-consultation-there-is-activity-7255515189968617472-FyMj?utm_source=share&amp;utm_medium=member_desktop ...</description><content:encoded><![CDATA[<p id="ember2615">(This is a follow up to this <a data-test-app-aware-link="" href="https://www.linkedin.com/pulse/ifoa-need-change-catalyst-deliver-neworg-patrick-john-lee-h107e/?trackingId=yVkbN4uTRkKspyvfFcm%2F3g%3D%3D" target="_self">previous article.</a> on LinkedIn and <a href="https://pjlee.net/blog/ifoa-the-need-for-change-and-the-catalyst-to-deliver-it-neworg" rel="follow">here</a> on this blog.)</p>
<p id="ember2616">Is the Institute and Faculty of Actuaries (IFoA) going too far with its regulation of members? There has been a very active public debate here on LinkedIn over the past week see e.g.</p>
<ul>
<li><a data-test-app-aware-link="" href="https://www.linkedin.com/posts/paulteggin_actuaries-code-dei-consultation-there-is-activity-7255515189968617472-FyMj?utm_source=share&amp;utm_medium=member_desktop" target="_self">https://www.linkedin.com/posts/paulteggin_actuaries-code-dei-consultation-there-is-activity-7255515189968617472-FyMj?utm_source=share&amp;utm_medium=member_desktop</a></li>
<li><a data-test-app-aware-link="" href="https://www.linkedin.com/posts/davidadamshaffer_dei-ifoa-actuaries-activity-7255536253746515968-OI9b?utm_source=share&amp;utm_medium=member_desktop" target="_self">https://www.linkedin.com/posts/davidadamshaffer_dei-ifoa-actuaries-activity-7255536253746515968-OI9b?utm_source=share&amp;utm_medium=member_desktop</a></li>
<li><a data-test-app-aware-link="" href="https://www.linkedin.com/posts/sueechiehtan_i-am-signing-paul-teggins-petition-to-object-activity-7254625837512024065-P9ox?utm_source=share&amp;utm_medium=member_desktop" target="_self">https://www.linkedin.com/posts/sueechiehtan_i-am-signing-paul-teggins-petition-to-object-activity-7254625837512024065-P9ox?utm_source=share&amp;utm_medium=member_desktop</a></li>
<li><a data-test-app-aware-link="" href="https://www.linkedin.com/posts/hiteshshah100_ifoa-dei-diversity-activity-7255625469998333953-mzAv?utm_source=share&amp;utm_medium=member_desktop" target="_self">https://www.linkedin.com/posts/hiteshshah100_ifoa-dei-diversity-activity-7255625469998333953-mzAv?utm_source=share&amp;utm_medium=member_desktop</a></li>
</ul>
<p id="ember2618">against the IFoA's proposals to embed controversial "DEI" into the Actuaries' Code and (largely in support of the proposals) IAA President (and IFoA Council member and Chief Actuary at Mercer) @Charles Cowling,&nbsp;<a data-test-app-aware-link="" href="https://www.linkedin.com/groups/141251/" target="_self"><strong>Maria Kamenarova, PhD, FRM</strong></a> and @Leah Evans' comments on those posts (particularly in response to former IFoA President <a data-test-app-aware-link="" href="https://www.linkedin.com/groups/141251/" target="_self"><strong>Tan Suee Chieh</strong></a>'s powerful intervention).</p>
<p id="ember2619">Although it could have, the IFoA has not conducted a poll of its members. The only non anonymous poll (publicised to the largest actuarial group on LinkedIn and elsewhere) was 2 IFoA members for, and 42 IFoA members and 7 ex IFoA members against the "DEI" proposals.</p>
<p id="ember2620">In echoes of the significant unhappiness last year in the way the surprise governance changes were handled (when a similar number of senior actuaries wrote in objecting to the changes, or at least to the lack of transparency and proper consultation) 98 IFoA members and 7 former members have co-signed <a data-test-app-aware-link="" href="https://www.linkedin.com/groups/141251/" target="_self"><strong>Paul Teggin</strong></a>'s consultation response opposing the proposals.</p>
<p id="ember2621">It is increasingly clear that the IFoA is losing the hearts and minds of a significant number of experienced members. Unfortunately, it doesn't seem to have listened to the concerns raised last year. For anyone who wants to and hasn't yet, the deadline for responses to the "DEI" consultations is 29 October.</p>
<p id="ember2622"></p>
<p id="ember2623">The IFoA acts as if members have no alternative. For many years they have been right.</p>
<h2 id="ember2624">Time for change</h2>
<p id="ember2625">As you may know, I am working on setting up NewOrg, an actuarial organisation that is designed to go back to a time when an actuarial membership body concentrated on regulating that its professionals behaved with integrity and competence in their work, and didn't overreach into members' personal and political lives.</p>
<p id="ember2626">IFoA current and former members will be able to register their interest in that within a day or two at the latest.</p>
<p id="ember2627">#actuaries #competition #valueformoney #transparency</p>]]></content:encoded></item><item><title>IFoA - the need for change and the catalyst to deliver it: [NewOrg]</title><link>https://pjlee.net/blog/ifoa-the-need-for-change-and-the-catalyst-to-deliver-it-neworg</link><media:content medium="image" url="https://cdn.buttercms.com/ejiAhibRx28UczCvH8eC" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 25 Oct 2024 00:11:00 +0000</pubDate><guid>https://pjlee.net/blog/ifoa-the-need-for-change-and-the-catalyst-to-deliver-it-neworg</guid><description>As IFoA members may know, I am working on a project to improve things by introducing competition into the near monopoly situation that the IFoA has enjoyed for many decades. #actuaries #competition #valueformoney #education #union As some of you already know, I am working on a project to introduce competition ...</description><content:encoded><![CDATA[<p>As IFoA members may know, I am working on a project to improve things by introducing competition into the near monopoly situation that the IFoA has enjoyed for many decades.</p>
<p><strong>#actuaries</strong>&nbsp;<strong>#competition</strong>&nbsp;<strong>#valueformoney</strong>&nbsp;<strong>#education</strong>&nbsp;<strong>#union</strong>&nbsp;</p>
<p id="ember2088">As some of you already know, I am working on a project to introduce competition into the monopoly that has been enjoyed for many years by the Institute and Faculty of Actuaries (IFoA).</p>
<h2 id="ember2089">Fellows and Associates</h2>
<p id="ember2090">I know many are frustrated and even angry at the way the IFoA has behaved during the last two years:</p>
<ul>
<li>in 2023 with the poor way the governance changes were handled and communicated</li>
<li>in both 2023 and 2024 with the way the IFoA and its Regulatory Board are persisting in pushing the controversial and political "DEI" ("Diversity Equity and Inclusion") doctrine into a key aspect of members' life: the Actuaries' Code.</li>
</ul>
<p id="ember2092">Having spent 34 years as an IFoA member, including 8 years as an insider (on Council and Management Board and other Boards/Committees), I think it is fair to say that after qualification most actuaries used to regard the IFoA with a modicum of respect or at worst with indifference.</p>
<p id="ember2093">In recent years, that seems to have changed with many now either fearing the IFoA or even strongly disliking it.</p>
<p id="ember2094">The IFoA is felt by many experienced Fellows to be:</p>
<ul>
<li>overly controlling</li>
<li>intrusive</li>
<li>bureaucratic</li>
<li>incompetent</li>
<li>secretive, and</li>
<li>poor value for money.</li>
</ul>
<p id="ember2096">Some actuaries (some 10% of Fellows) have no choice but to be with the IFoA: those who by legislation need a Practising Certificate for their job.</p>
<p id="ember2097">Traditionally an unknown (because the IFoA do not disclose this) number of Fellows leave the IFoA before retirement, either because they feel that their job no longer needs IFoA membership (and they no longer wish to pay high fees to stay a member). For reasons that the IFoA said they wanted to research and publish (but have so far failed to do so), this happens disproportionately to female Fellows.</p>
<p id="ember2098">But increasingly I hear Fellows who are fully intending to continue working for many years saying "if only there was an alternative organisation, I'm really fed up with the IFoA".</p>
<p id="ember2099">These Fellows (who don't need a Practising Certificate) stay because they have felt that the only alternative is to not be a member of any actuarial body. They are reluctant to do for a variety of reasons including:</p>
<ul>
<li>fear that their employer or clients will be unhappy if they are no longer an FIA/FFA (or in some cases an Associate [the number of Associates is still very small compared to Fellows])</li>
<li>fear that their professional indemnity insurance costs will increase</li>
<li>possible loss of networking</li>
<li>possible impact on their future career</li>
<li>a general reluctance to avoid a leap into the unknown.</li>
</ul>
<p id="ember2101">All this is understandable.</p>
<h2 id="ember2102">Students</h2>
<p id="ember2103">While reddit forums are not going to be representative of all IFoA students, they are nevertheless a useful guide to trends in student views towards the IFoA.</p>
<p id="ember2104">It only takes a casual glance at posts on <a data-test-app-aware-link="" href="https://www.reddit.com/r/ActuaryUK/" target="_self">the main sub Reddit</a> used by IFOA actuaries around exam booking, sitting and result times to see the massive level of frustration that students have about their experience with the IFoA.</p>
<p id="ember2105">Frequent pain points seem to be:</p>
<ul>
<li>technology failures (e.g. when booking exams, but particularly on exam result days, which are stressful enough without having to repeatedly try to login to a site that keeps crashing)</li>
<li>things that make the exams unnecessarily difficult (questions mismatched with the tuition or past papers, unpredictability and wide spread between markers, time pressure that is unwarranted because rarely needed in actuarial work)</li>
<li>having to compete against well organised online cheating groups (something that the IFoA inexplicably - and unforgivably in my opinion - exacerbated by holding staggered sittings of the same exam paper at different time intervals!)</li>
<li>frequent changes to the exam formats and rules</li>
<li>confusing rules about "plagiarism" which increases anxiety among the majority of diligent students about false positives (anecdotally several students have been falsely accused of plagiarism by the IFoA - although once again, the IFoA publishes little or no information about false positives and no statistics about alleged breaches of its "Assessment Regulations" - the rules students are subject to about exams)</li>
<li>The very long and uncertain qualification time and the student dropout rate (again the IFoA publishes little or no information about this). My research shows that the time to reach Fellowship is increasing and has extremely high variability, and that about half of students who join the IFoA never make it to Fellowship.</li>
</ul>
<p id="ember2107">Students who want to reach Fellowship (or Associateship) have little choice (unless the IFoA reintroduces lots of MRAs - Mutual Recognition Agreements - which in the past have allowed European actuaries to qualify often with only a handful of exams after university, as compared to the 13 that the IFoA currently requires). They have to stay with the IFoA until such time as they either qualify or decide that they have had enough of the exams.</p>
<p id="ember2108">The IFoA therefore has a very high level of monopoly power over students. How has it used it?</p>
<p id="ember2109">Well, if anything over the past few years the IFoA has arguably taken greater advantage of this power than before, not less.</p>
<p id="ember2110">For example:</p>
<ul>
<li>Despite boasting repeatedly in successive years about significant improvements to its website, the experience that students suffer on exam result days has generally remained dire</li>
<li>The IFoA used to run student consultative forums which were at least a semblance of giving students a voice. But no student consultative forum minutes seem to have been published for several years, Even when minutes were published, students have complained that the minutes were heavily edited in favour of the IFoA.</li>
</ul>
<h2></h2>
<h2 id="ember2112">How can we improve the journey for both students and Fellows/Associates?</h2>
<p id="ember2113">What I am working on is a solution that will help both of these groups.</p>
<h2 id="ember2114">For Fellows and Associates who don't need a Practising Certificate</h2>
<p id="ember2115">A new actuarial membership organisation [NewOrg] which they can join (either instead of, or in addition to the IFoA) which will:</p>
<ul>
<li>recognise the IFoA Fellow/ Associate qualifications and grant them Fellow / Associate membership of the new body</li>
<li>record and monitor that members complete annual CPD requirements</li>
<li>have a code of conduct (confined to professional life and proportionate and non intrusive, unlike the current IFoA)</li>
<li>allow professional indemnity brokers/insurers/underwriters and clients/employers to verify that a member has the status they claim (Fellow / Associate)</li>
<li>provide quality content including networking opportunities and online discussions</li>
<li>for members who are still members of the IFoA, powerful facilities to organise</li>
<li>for members who are still members of the IFoA, the mere existence of [NewOrg] will act as a strong catalyst for improved service and better value for money from the IFoA.</li>
</ul>
<p></p>
<h2 id="ember2117">For IFoA students</h2>
<p id="ember2118">IFoA students are stuck with the IFoA until such time as they either qualify or stop taking the exams.</p>
<p id="ember2119">As mentioned above the IFoA has enjoyed a near monopoly. In my opinion it has abused that power. Students have felt powerless and understandably fearful (note that practically all the posters on the main IFoA reddit sub group are anonymous). Occasional attempts have been made to organise petitions to send to the IFoA but these have usually been abandoned shortly after creation or been largely ignored by the IFoA.</p>
<p id="ember2120">History shows that there is a very powerful remedy to such an imbalance of power: <strong>a union</strong>.</p>
<p id="ember2121">What I have in mind is a union of IFoA students, for significantly less than the current IFoA student subscription fee. A union which will provide students with:</p>
<ul>
<li>the ability to organise and have strength in numbers</li>
<li>a General Secretary (me) who will be their voice and pursue just demands and grievances with the IFoA.</li>
<li>no longer will students need to personally stick their heads above the parapet with the IFoA. The Union and its General Secretary will do that for them.</li>
</ul>
<p id="ember2123">And for those students who qualify: they will no longer be faced with a monopoly (the IFoA). Once they reach Fellowship they can choose between the IFoA and [NewOrg].</p>
<h2 id="ember2124">Interested? Register when the waitlist is available</h2>
<p id="ember2125">If you are an IFoA Fellow, Associate or student with whom any of the above resonates, <em>you will soon be able to register your interest in a waitlist</em>. You can also message me here on LinkedIn if you want information earlier.</p>
<p id="ember2126">#actuaries #competition #valueformoney #education #union</p>]]></content:encoded></item><item><title>Upgraded this site (and associated function) to .NET 8</title><link>https://pjlee.net/blog/upgraded-this-site-and-associated-function-to-net-8</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 13 Oct 2024 15:28:41 +0000</pubDate><guid>https://pjlee.net/blog/upgraded-this-site-and-associated-function-to-net-8</guid><description>I have just upgraded this website from .NET 7 to .NET 8, and also the associated Azure function from .NET 6 in-process to .NET 8 isolated. Upgrading an app service (website) from .NET 7 (or 6) to .NET 8 is pretty straightforward and essentially just involves changing the target framework ...</description><content:encoded><![CDATA[<p>I have just upgraded this website from .NET 7 to .NET 8, and also the associated Azure function from .NET 6 in-process to .NET 8 isolated.</p>
<p>Upgrading an app service (website) from .NET 7 (or 6) to .NET 8 is pretty straightforward and essentially just involves changing the target framework in the csproj file to &lt;TargetFramework&gt;net8.0&lt;/TargetFramework&gt;.</p>
<p>Upgrading an Azure function from .NET 6 (or 7) in-process to .NET isolated is quite a bit more complex, with several "gotchas" which Microsoft have not documented very well.&nbsp; You have to not only make several more changes to the csproj file, and change "FUNCTIONS_WORKER_RUNTIME" from "dotnet to "dotnet-isolated", but you also have to change the way dependency injection works (thankfully to be more consistent with app services - the differences between app services and functions were very annoying in the past).&nbsp; The way logging works also needs to change, and that is very poorly documented at the moment.</p>]]></content:encoded></item><item><title>IFoA travel time to Fellowship: no evidence from the sample that actuarial science graduates/masters qualify any quicker</title><link>https://pjlee.net/blog/ifoa-travel-time-to-fellowship-no-evidence-from-the-sample-that-actuarial-science-graduatesmasters-q</link><media:content medium="image" url="https://cdn.buttercms.com/iLh6QwJ4Sbm2rxdzodsq" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 01 May 2023 19:25:00 +0000</pubDate><guid>https://pjlee.net/blog/ifoa-travel-time-to-fellowship-no-evidence-from-the-sample-that-actuarial-science-graduatesmasters-q</guid><description>There is no evidence (at least from this sample of 307 Fellows) that actuarial science graduates or masters students qualify any quicker than students who do other degrees and don't do an actuarial science masters. This is likely to be of concern both to the IFoA and the universities offering such courses. Once again I urge the IFoA to be transparent and publish a detailed study using its full dataset.</description><content:encoded><![CDATA[<p>This is a follow up to my <a href="https://pjlee.net/blog/time-to-qualify-as-an-ifoa-actuary-how-long-it-really-takes-in-practice" rel="follow">previous article</a> on the times taken to qualify as a Fellow of the Institute and Faculty of Actuaries (IFoA).</p>
<p>Below is a comparison of the distribution of travel time to Fellowship of all 307 new Fellows in the sample with the distribution of the subset of 123 (out of the 307) who had taken an actuarial science degree or an actuarial science masters (or both).</p>
<figure class="image"><img src="https://cdn.buttercms.com/iLh6QwJ4Sbm2rxdzodsq" alt="Distribution of Fellowship Travel Time All v Actuarial Science Graduates (2020To2022)">
<figcaption>Distribution of Fellowship Travel Time All v Actuarial Science Graduates (2020 to 2022)</figcaption>
</figure>
<p>The differences are very small.</p>
<p>The conclusion is that there is no evidence (at least from this sample of 307 Fellows) that actuarial science graduates or masters students qualify any quicker than students who do other degrees and don't do an actuarial science masters.</p>
<p>This is likely to be of concern both to the IFoA and the universities offering such courses. <strong>Once again I urge the IFoA to be transparent and publish a detailed study using its full dataset.</strong></p>
<p></p>
<p></p>]]></content:encoded></item><item><title>The IFoA long qualification process: some evidence that it is slightly longer for women (by about half a year)</title><link>https://pjlee.net/blog/the-ifoa-long-qualification-process-some-evidence-that-it-is-slightly-longer-for-women-by-about-half</link><media:content medium="image" url="https://cdn.buttercms.com/B9GmJLCbTUegs8tNtaIh" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 01 May 2023 18:56:00 +0000</pubDate><guid>https://pjlee.net/blog/the-ifoa-long-qualification-process-some-evidence-that-it-is-slightly-longer-for-women-by-about-half</guid><description>Here are the results split by sex in table form: Distribution of Fellowship Travel Time by Sex and graphically, first via histograms: Histograms of Fellowship travel time by sex and secondly by Box Whisker charts (the blue shaded boxes show the interquartile range, which really ought to be what the ...</description><content:encoded><![CDATA[<div class="_3xX726aBn29LDbsDtzr_6E _1Ap4F5maDtT1E1YuCiaO0r D3IL3FD0RFy_mkKLPwL4" data-click-id="text" data-adclicklocation="media">
<div class="_292iotee39Lmt0MkQZ2hPV RichTextJSON-root">
<p class="_1qeIAgB0cPwnLhDF9XSiJM">Here are the results split by sex in table form:</p>
<div class="_2-UiOdhyj4wHBv7Rc2FeDr c1cmiB1jfdq4sxidlPDAx">
<div class="_3Oa0THmZ3f5iZXAQ0hBJ0k _2LjgQiHLCZ9LDbCQx5KaOi "><a href="https://preview.redd.it/vz5l2j5uk9xa1.png?width=877&amp;format=png&amp;auto=webp&amp;v=enabled&amp;s=ec2f72439a590137ce7b6d6fd897ec279feb637a" target="_blank" rel="noopener noreferrer" class="_3m20hIKOhTTeMgPnfMbVNN"><img alt="r/Actuary_news - The IFoA long qualification process: some evidence that it is slightly longer for women (by about half a year)" class="_2_tDEnGMLxpM6uOa2kaDB3 ImageBox-image media-element _1XWObl-3b9tPy64oaG6fax" src="https://preview.redd.it/vz5l2j5uk9xa1.png?width=877&amp;format=png&amp;auto=webp&amp;v=enabled&amp;s=ec2f72439a590137ce7b6d6fd897ec279feb637a"></a></div>
</div>
<p class="FJNSiirwoPtG58aeGw2Jx">Distribution of Fellowship Travel Time by Sex</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">and graphically, first via histograms:</p>
<div class="_2-UiOdhyj4wHBv7Rc2FeDr c1cmiB1jfdq4sxidlPDAx">
<div class="_3Oa0THmZ3f5iZXAQ0hBJ0k _2LjgQiHLCZ9LDbCQx5KaOi "><a href="https://preview.redd.it/gb6c21bdl9xa1.png?width=404&amp;format=png&amp;auto=webp&amp;v=enabled&amp;s=90412e3d35ce66da07a6023784215edb5d6b64c7" target="_blank" rel="noopener noreferrer" class="_3m20hIKOhTTeMgPnfMbVNN"><img alt="r/Actuary_news - The IFoA long qualification process: some evidence that it is slightly longer for women (by about half a year)" class="_2_tDEnGMLxpM6uOa2kaDB3 ImageBox-image media-element _1XWObl-3b9tPy64oaG6fax" src="https://preview.redd.it/gb6c21bdl9xa1.png?width=404&amp;format=png&amp;auto=webp&amp;v=enabled&amp;s=90412e3d35ce66da07a6023784215edb5d6b64c7"></a></div>
</div>
<p class="FJNSiirwoPtG58aeGw2Jx">Histograms of Fellowship travel time by sex</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">and secondly by Box Whisker charts (the blue shaded boxes show the interquartile range,<span>&nbsp;</span><strong class="_12FoOEddL7j_RgMQN0SNeU">which really ought to be what the IFoA mentions when it says "most people qualify within"</strong>):</p>
<div class="_2-UiOdhyj4wHBv7Rc2FeDr c1cmiB1jfdq4sxidlPDAx">
<div class="_3Oa0THmZ3f5iZXAQ0hBJ0k media-element _2LjgQiHLCZ9LDbCQx5KaOi "><a href="https://preview.redd.it/yi21xetam9xa1.png?width=397&amp;format=png&amp;auto=webp&amp;v=enabled&amp;s=66016637d68660fb9c02410a8f12523cd56b16fd" target="_blank" rel="noopener noreferrer" class="_3m20hIKOhTTeMgPnfMbVNN"><img alt="r/Actuary_news - The IFoA long qualification process: some evidence that it is slightly longer for women (by about half a year)" class="_2_tDEnGMLxpM6uOa2kaDB3 ImageBox-image _1XWObl-3b9tPy64oaG6fax" src="https://preview.redd.it/yi21xetam9xa1.png?width=397&amp;format=png&amp;auto=webp&amp;v=enabled&amp;s=66016637d68660fb9c02410a8f12523cd56b16fd"></a></div>
</div>
<p class="FJNSiirwoPtG58aeGw2Jx">Box &amp; Whisker charts of Fellowship travel time by sex</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">Note that the medians and means for women are slightly higher (6.58 and 7.74 years), than those for men, (6.17 and 7.21 years), so by about half a year.</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">The question is whether this difference is statistically significant. <span>&nbsp;The IFoA should provide an analysis of the full dataset.</span></p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">In the meantime, one way of looking at this is to take the male distribution and simulate it 10,000 times for the female sample size of 112. That gives us 10,000 populations of 112 each. For each of these we can calculate the median qualification time.</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">That then gives us 10,000 medians from a population size of 112, which we can sort in order.</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">We can then look to see where the current female median of 6.58 years fits in that sorted list.</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM"><strong class="_12FoOEddL7j_RgMQN0SNeU">I did that, and 6.58 appears at around the 89% percentile.</strong></p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM">In other words, the difference is statistically significant at the 11% level, but not at a 5% level.</p>
<p class="_1qeIAgB0cPwnLhDF9XSiJM"><strong class="_12FoOEddL7j_RgMQN0SNeU">My conclusion is that the difference is not large enough to be clearly statistically significant, but the 11% level is large enough to warrant more investigation.</strong><span>&nbsp;</span><strong class="_12FoOEddL7j_RgMQN0SNeU">I urge the IFoA once again to publish the full data, which has much larger samples</strong>.<i class="icon icon-comment _3DVrpDrMM9NLT6TlsTUMxC" role="presentation"></i></p>
</div>
</div>]]></content:encoded></item><item><title>Time to qualify as an IFoA actuary: how long it really takes in practice</title><link>https://pjlee.net/blog/time-to-qualify-as-an-ifoa-actuary-how-long-it-really-takes-in-practice</link><media:content medium="image" url="https://cdn.buttercms.com/Oog8KeleTFyY0SgLhYI2" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 01 May 2023 17:06:00 +0000</pubDate><guid>https://pjlee.net/blog/time-to-qualify-as-an-ifoa-actuary-how-long-it-really-takes-in-practice</guid><description>A summary of the analysis I carried out on a sample of the 2020 to 2022 new qualifiers (Associates and Fellows) of the Institute and Faculty of Actuaries. Associate Travel time: median 5.54 years, mean 6.71 years. Fellow Travel time: median 6.63 years, mean 7.42 years.</description><content:encoded><![CDATA[<p class="reader-text-block__paragraph"><a href="https://www.linkedin.com/feed/hashtag/actuaries">#actuaries</a><span>&nbsp;</span><a href="https://www.linkedin.com/feed/hashtag/traveltime">#traveltime</a><span>&nbsp;</span><a href="https://www.linkedin.com/feed/hashtag/education">#education</a><span>&nbsp;</span><a href="https://www.linkedin.com/feed/hashtag/standards">#standards</a><span>&nbsp;</span><a href="https://www.linkedin.com/feed/hashtag/ifoa">#ifoa</a></p>
<p class="reader-text-block__paragraph"><strong>Methodology</strong></p>
<p class="reader-text-block__paragraph">I have carried out an analysis of what I hope is a representative sample from the 3,438 new qualifier records currently publicly available from the IFoA (Institute and Faculty of Actuaries) website. The latter are the new qualifiers from the 6 lists published from August 2020 to December 2022.</p>
<p class="reader-text-block__paragraph">I have analysed 415 out of the 3,438 records.</p>
<p class="reader-text-block__paragraph">The sample I have taken covers 108 out of the 584 new Associates and 307 out of the 2,618 new Fellows.</p>
<p class="reader-text-block__paragraph">For each of these I have extracted (via a search on LinkedIn and/or the web generally) the likely starting date of work as an actuary (e.g. as an Actuarial Trainee, or Actuarial Assistant or similar). I have<span>&nbsp;</span><strong>not</strong><span>&nbsp;</span>taken the start date of an actuarial science degree or Masters, and I have ignored placements at actuarial firms during part of a degree course, and summer intern placements.</p>
<p class="reader-text-block__paragraph">So for example, for someone doing a 3 year actuarial science degree followed by a one year Masters in Actuarial Science, I have taken the start date as the first date on their profile<span>&nbsp;</span><strong>after</strong><span>&nbsp;</span>the end of both of those.</p>
<p class="reader-text-block__paragraph">I have then used the time between that start date and the start of the month of issue of the relevant IFoA new qualifiers list (e.g. 1 December 2022 for the December 2022 list). That is the travel time to Associate or Fellow, depending on which list the actuary appears in.</p>
<p class="reader-text-block__paragraph"><strong>Important</strong>: because I am also interested in the time it takes to get from Associate to Fellow, I included in my sample of Associates and Fellows those who appeared as both of these in the 6 new qualifier lists. I will give the figures both including and excluding these "double" members in case that introduces a bias.</p>
<p class="reader-text-block__paragraph"><strong>Headline results:</strong></p>
<p class="reader-text-block__paragraph">Associate Travel time: median 5.54 years, mean 6.71 years. Excluding double members: median 4.21, mean 6.18</p>
<p class="reader-text-block__paragraph">Fellow Travel time: median 6.63 years, mean 7.42 years. Excluding double members: median 6.09, mean 7.23.</p>
<p class="reader-text-block__paragraph">A fuller article coming later with results split by sex, country, whether or not the student did an actuarial science course, and university.</p>]]></content:encoded></item><item><title>IFoA Roulette, or "Do I feel lucky? Well, do ya, punk?"</title><link>https://pjlee.net/blog/ifoa-roulette-or-do-i-feel-lucky-well-do-ya-punk</link><media:content medium="image" url="https://cdn.buttercms.com/QjqMT8YSYahaOIYeAdNL" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 01 May 2023 17:06:00 +0000</pubDate><guid>https://pjlee.net/blog/ifoa-roulette-or-do-i-feel-lucky-well-do-ya-punk</guid><description>Further to my previous article with an analysis of the time taken to qualify by recent (2020-2022) new Fellows and Associates of the Institute and Faculty of Actuaries, you can try a simulation of how long it might take you to qualify here.</description><content:encoded><![CDATA[<p>Further to my <a href="https://pjlee.net/blog/time-to-qualify-as-an-ifoa-actuary-how-long-it-really-takes-in-practice">previous article</a> with an analysis of the time taken to qualify by recent (2020-2022) new Fellows and Associates of the Institute and Faculty of Actuaries, you can try a simulation of how long it might take you to qualify <a href="https://pjlee.net/Home/IFoARoulette">here</a>.</p>]]></content:encoded></item><item><title>How to check or save the Configuration app settings for an Azure app service</title><link>https://pjlee.net/blog/how-to-check-or-save-the-configuration-app-settings-for-an-azure-app-service</link><media:content medium="image" url="https://cdn.buttercms.com/0Zd952nlS5idawWUekfW" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 15 Feb 2023 08:48:00 +0000</pubDate><guid>https://pjlee.net/blog/how-to-check-or-save-the-configuration-app-settings-for-an-azure-app-service</guid><description>For security reasons, you should not be storing production setting values in source control. But this means that by default, you don't have your own backup of the values for your live, production settings. What if you want to store a copy of your settings (e.g. along with the artifacts) ...</description><content:encoded><![CDATA[<p>For security reasons, you should <strong>not</strong> be storing production setting values in source control. But this means that by default, you don't have your own backup of the values for your live, production settings.</p>
<p>What if you want to store a copy of your settings (e.g. along with the artifacts) in a secure location for each version of the software you release?</p>
<p>There doesn't currently seem to be an easy way to export the values of the settings from the app service's Configuration view (<strong>Microsoft: why not? There should be!</strong>).</p>
<p>Instead, you can get it from the app service's <strong>Kudu</strong> website (Development tools, Advanced tools, Go).&nbsp; On the Kudu site's home page, there is an App Settings link under REST API which gives you a json file with the settings and their values.</p>
<p>This will take you to a url like this (with https://[yourappservicename].scm.azurewebsites.net being the address of the Kudu site):</p>
<p>https://[yourappservicename].scm.azurewebsites.net/api/settings</p>
<p><strong>Note </strong></p>
<p>For some reason, the list does <strong>not</strong> seem to include settings which are in the ConnectionStrings part of the app service's Configuration.&nbsp; Why not? Again this seems odd, Microsoft.</p>]]></content:encoded></item><item><title>EFCore Power Tools is useful in the migration from Entity Framework to Entity Framework Core</title><link>https://pjlee.net/blog/efcore-power-tools-is-useful-in-the-migration-from-entity-framework-to-entity-framework-core</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 13 Feb 2023 08:59:00 +0000</pubDate><guid>https://pjlee.net/blog/efcore-power-tools-is-useful-in-the-migration-from-entity-framework-to-entity-framework-core</guid><description>I was able to migrate a legacy project using .net framework and entity framework to .NET 7 and EFCore relatively easily. EFCore Power Tools was very useful in doing a first draft of model code from the existing database.</description><content:encoded><![CDATA[<p>I recently used EFCore PowerTools (a Visual Studio extension by Erik Ejlskov Jensen - great work Erik, a fantastic tool!) to create model code from an existing database. That was an excellent starting point and with a few modifications, I was able to complete the migration of an MVC website which had used .net framework 4.72 and Entity Framework 6.4.4 to .NET 7 and Entity Framework Core 7.0.2 relatively straightforwardly.</p>
<p>For information about EFCore Power Tools see&nbsp;<a href="https://www.youtube.com/watch?v=uph-AGyOd8c">https://www.youtube.com/watch?v=uph-AGyOd8c</a>, That video is from 2020, but Erik has updated the tool (including on 31 Dec 2022!) and it has been downloaded over 250k times. He is <a href="https://twitter.com/ErikEJ">https://twitter.com/ErikEJ</a> on Twitter</p>]]></content:encoded></item><item><title>This site updated to use .NET 7 rather than .NET 6</title><link>https://pjlee.net/blog/this-site-updated-to-use-net-7-rather-than-net-6</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 08 Feb 2023 01:36:00 +0000</pubDate><guid>https://pjlee.net/blog/this-site-updated-to-use-net-7-rather-than-net-6</guid><description>Upgrading a .NET 6 to .NET 7 app service seems very straightforward. Upgrading Azure functions to .NET 7 looks to be a more significant change, and might require some investigation first.</description><content:encoded><![CDATA[<p>I updated this site from .NET 6 to .NET 7.&nbsp; As with the change from .NET 5 to .NET 6, this was quite easy: I just had to change the target framework in the project's csproj file from&nbsp;</p>
<p>&lt;TargetFramework&gt;net6.0&lt;/TargetFramework&gt;</p>
<p>to&nbsp;</p>
<p>&lt;TargetFramework&gt;net7.0&lt;/TargetFramework&gt;</p>
<p>However, for some reason, although I asked in the publish profile from Visual Studio 2022 for it to publish using .NET 7, this didn't happen: I had to increase the setting by hand (Configuration, General settings) in the Azure portal for the app service to use .NET 7.</p>
<p>This was for the app service.&nbsp; There is also an Azure function (which updates an Azure Table every day so that the data that is used to create the category and tag clouds is kept up to date).&nbsp; It is not so clear that the function should be upgraded from .NET 6 to .NET 7 because .NET 7 functions are meant to run using the <a href="https://devblogs.microsoft.com/dotnet/dotnet-7-comes-to-azure-functions/" title="Microsoft article on .NET 7 for Azure functions">.NET Isolated Worker model</a>, which could be a more significant change than that just upgrading the target framework for an app service.&nbsp;</p>
<p>.</p>
<p></p>]]></content:encoded></item><item><title>A reminder that .NET 6 (or 7) code can work with Entity Framework 6.3.3 and later, although EF Core is better</title><link>https://pjlee.net/blog/a-reminder-that-net-6-or-7-code-can-work-with-entity-framework-633-and-later-although-ef-core-is-bet</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 08 Feb 2023 00:02:00 +0000</pubDate><guid>https://pjlee.net/blog/a-reminder-that-net-6-or-7-code-can-work-with-entity-framework-633-and-later-although-ef-core-is-bet</guid><description>If your legacy code uses Entity Framework 6.3.3 or later, you don't necessarily need to move to Entity Framework Core at the same time that you move from .net framework 4.7/4.8 to .NET 6 or 7.</description><content:encoded><![CDATA[<p>If like me you need to port some older projects using .NET Framework and Entity Framework to .NET 6 (or 7), then you might find it easier to do the change in two steps (or possibly even omit the 2nd step completely, although that would lose the advantages that EF Core brings):</p>
<ol>
<li>If the older code uses (or can be upgraded to use) Entity Framework 6.3.3 or later, then as an initial step you can keep the entity framework code largely unchanged, and just change the other code to .NET 6 or 7. This is because EF 6.3.3 works with .NET Core (see <a href="https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0-and-ef-6-3-general-availability/#what-s-new-in-ef-6-3">this article</a>).</li>
<li>Once you have got rid of the .net framework code and replaced it with .NET 6 or 7, at a later date you can migrate the code from using Entity Framework to Entity Framework Core.</li>
</ol>
<p></p>
<p></p>]]></content:encoded></item><item><title>If you get TLS 1.0 or 1.1 error, one possibility might be that you are using an older app service that needs migrating to .NET 6 (or at least framework 4.8)</title><link>https://pjlee.net/blog/if-you-get-tls-10-or-11-error-one-possibility-might-be-that-you-are-using-an-older-app-service-that</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 07 Feb 2023 08:42:00 +0000</pubDate><guid>https://pjlee.net/blog/if-you-get-tls-10-or-11-error-one-possibility-might-be-that-you-are-using-an-older-app-service-that</guid><description>One possible solution to a "You are using TLS version 1.0, 1.1 and/or 3DES cipher which are deprecated" error might be to upgrade any older app services that are using older versions of .net framework.</description><content:encoded><![CDATA[<p>After years of this working with no problem, I got this error when making a call to ADB2C to retrieve the logged in user's sign-in name (<span style="mso-spacerun: yes;">&nbsp;</span>user.SignInNames[0].Value;), which for some reason Microsoft don't expose in the claims that can be returned in the login token:</p>
<blockquote>
<p>Error : AADSTS1002016: You are using TLS version 1.0, 1.1 and/or 3DES cipher which are deprecated to improve the security posture of Azure AD. Your TenantID is: [Guid]. Please refer to https://go.microsoft.com/fwlink/?linkid=2161187 and conduct needed actions to remediate the issue. For further questions, please contact your administrator.</p>
</blockquote>
<p>There was no obvious reference to TLS in my apps and I didn't find the articles by Microsoft on how to solve the error particularly helpful (e.g. see https://learn.microsoft.com/en-us/troubleshoot/azure/active-directory/enable-support-tls-environment?tabs=azure-monitor). I eventually solved it by realising that the call to ADB2C was being made by an old WebAPI service that still used .net framework 4.5.2. &nbsp;I was going to migrate this to .NET 7, but then tried just migrating it to .NET framework 4.8 and that worked. &nbsp;The reason is probably that the instance that Microsoft was hosting the 4.5.2 app service on was probably running an older version of Windows that used TLS 1.0 or 1.1.</p>
<p>So if you get that TLS 1.0/1.1 error message, consider this as a possible reason.</p>]]></content:encoded></item><item><title>Microsoft LUIS apps: deprecated in favour of CLU and difficult to migrate, but still work! (for now)</title><link>https://pjlee.net/blog/microsoft-luis-apps-deprecated-in-favour-of-clu-and-difficult-to-migrate-but-still-work-for-now</link><media:content medium="image" url="https://cdn.buttercms.com/oowVRkqDRMSqIQZ3i3FY" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 07 Feb 2023 08:28:00 +0000</pubDate><guid>https://pjlee.net/blog/microsoft-luis-apps-deprecated-in-favour-of-clu-and-difficult-to-migrate-but-still-work-for-now</guid><description>Microsoft's Natural Language Processing LUIS apps seem to be deprecated in favour of CLU but are currently difficult to migrate. However the LUIS apps still seem to work - for now at least!</description><content:encoded><![CDATA[<p>Microsoft introduced <a href="https://learn.microsoft.com/en-us/azure/cognitive-services/luis/what-is-luis">LUIS</a> (Language Understanding Intelligent Service) as its Natural Language Processing service a few years ago.&nbsp; I wrote about my use of this in apps <a href="https://pjlee.net/blog/let-your-users-ask-whats-my-next-step-a-very-useful-ai-addition-to-your-apps" title="What is my next step?">here</a> (to provide a more natural and intelligent alternative to mouse navigation: the software suggests next steps for the user)</p>
<p>If you revisit such apps now, you are informed that you need to migrate them to <a href="https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/conversational-language-understanding/overview">CLU</a> (Conversational Language Understanding) but at present the migration seems to be buggy with repeated errors.&nbsp; (Please fix this Microsoft).</p>
<p>However the original LUIS apps still seem to work (for now at least).</p>]]></content:encoded></item><item><title>app.diagrams.net (formerly draw.io): a useful free tool for doing cloud and other architecture charts</title><link>https://pjlee.net/blog/appdiagramsnet-formerly-drawio-a-useful-free-tool-for-doing-cloud-and-other-architecture-charts</link><media:content medium="image" url="https://cdn.buttercms.com/h4r6hvwsQqOSXSyVARTb" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 28 Jan 2023 17:13:00 +0000</pubDate><guid>https://pjlee.net/blog/appdiagramsnet-formerly-drawio-a-useful-free-tool-for-doing-cloud-and-other-architecture-charts</guid><description>I have found app.diagrams.net useful for doing architecture charts to document and explain how the different components in a distributed application work together..</description><content:encoded><![CDATA[<p>I have found app.diagrams.net useful for doing architecture charts to document and explain how the different components in a distributed application work together.</p>
<p>These normally include:</p>
<ul>
<li>a front end (either web, mobile or desktop)</li>
<li>an authentication layer (e.g. Azure ADB2C - business to consumer)</li>
<li>WebApis (either - if called directly by the user - requiring the user to be logged in via ADB2C, or - if called by another component - they could instead be protected via an APIKey, with other useful information transmitted in the headers)</li>
<li>Azure functions (for serverless, scaleable computing)</li>
<li>Azure SQL databases (for structured storage)</li>
<li>Azure Storage accounts (for unstructured storage, e.g. blob files for images, json files, pdf reports, logs)</li>
<li>Azure Cosmos Db (for more expensive unstructured storage requiring more search facilities)</li>
<li>KeyVaults (to store secrets such as database connection strings).</li>
</ul>
<p>Such diagrams are essential tools to help other developers understand how the system works.</p>
<p>It has libraries for Azure and Office that has suitable shapes to include in your diagram (see the screenshot at the top of this post for some examples).</p>]]></content:encoded></item><item><title>LogVersionInfo: a useful subfunction to include in your Azure Functions to record the version used every day (or other interval)</title><link>https://pjlee.net/blog/logversioninfo-a-useful-subfunction-to-include-in-your-azure-functions-to-record-the-version-used-ev</link><media:content medium="image" url="https://cdn.buttercms.com/ERSoRLNQDeHJ5E5jcUYg" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 28 Jan 2023 16:59:00 +0000</pubDate><guid>https://pjlee.net/blog/logversioninfo-a-useful-subfunction-to-include-in-your-azure-functions-to-record-the-version-used-ev</guid><description>When deploying code, it is important to be able to have an easy way to check that the deployment worked and that the version deployed is the one you published. This is particularly important when deploying by swapping (e.g. from stage to production): in my experience, the swaps work about ...</description><content:encoded><![CDATA[<p>When deploying code, it is important to be able to have an easy way to check that the deployment worked and that the version deployed is the one you published.&nbsp; This is particularly important when deploying by swapping (e.g. from stage to production): in my experience, the swaps work about 98% of the time, but in about 2% of cases they fail e.g. due to a timeout.&nbsp; When that happens, how do you know what is the state of your application? Did the swap succeed or not? It is very hard to&nbsp;</p>
<p>You can do this for WebAPI by adding a GetNameAndVersionInfo method that can be called (and only needs to be protected by an APIKey rather than requiring a user to be logged in).</p>
<p>But what to do for Azure Functions? You could add a subfunction triggered by a web hook, but in order to have a record of different versions, I prefer to use a LogVersionInfo function triggered by a timer, normally daily.</p>
<p>You can also trigger it on demand (e.g. just after a deployment to check that the expected version has been deployed) by using the Code + Test section for the sub function in the Azure portal., and clicking the Test/Run link. (For some reason, you sometimes need to run it twice - another area where the Azure portal is a bit buggy that Microsoft should fix).</p>]]></content:encoded></item><item><title>Microsoft Azure's Monitor for Azure Functions is buggy - check the logs for any missing data</title><link>https://pjlee.net/blog/microsoft-azures-monitor-for-azure-functions-is-buggy-check-the-logs-for-any-missing-data</link><media:content medium="image" url="https://cdn.buttercms.com/ERSoRLNQDeHJ5E5jcUYg" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 28 Jan 2023 16:42:00 +0000</pubDate><guid>https://pjlee.net/blog/microsoft-azures-monitor-for-azure-functions-is-buggy-check-the-logs-for-any-missing-data</guid><description>In the Azure portal, for Azure Functions, I've found that the Monitor section for individual subfunctions is not infrequently a bit buggy, in that it misses out some function runs, particularly for functions trigged by a timer.  To check whether the function actually ran on a particular day, check the logs for the function: they are usually far more complete.</description><content:encoded><![CDATA[<p>In the Azure portal, for Azure Functions, I've found that the Monitor section for individual subfunctions (go to Functions, click on the subfunction, then Monitor from the left hand menu) is not infrequently <strong>a bit buggy</strong>, in that it <strong>misses out</strong> some function runs, particularly for functions trigged by a timer.&nbsp; This is something Microsoft out to fix, but haven't for many years.&nbsp;</p>
<p>If as sometimes happens, you find gaps in the monitor's records, to check whether the function actually ran on a particular day, check the logs for the function: they are usually far more complete.</p>
<p>Of course if sampling is being applied to the Application Insights resource that the Azure Function is linked to, then some of your non error traces could be missing even in the logs.&nbsp; If so, then you may need to either amend the settings for AppInsights (to avoid sampling being applied to particular types of traces), or you might need to pay for a more expensive AppInsights resource.</p>]]></content:encoded></item><item><title>An Excel VBA multiple decrement model of IFoA membership (v1)</title><link>https://pjlee.net/blog/an-excel-vba-multiple-decrement-model-of-ifoa-membership-v1</link><media:content medium="image" url="https://cdn.buttercms.com/w48PBkUVR65E0QIDzuGg" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 10 Sep 2022 21:43:00 +0000</pubDate><guid>https://pjlee.net/blog/an-excel-vba-multiple-decrement-model-of-ifoa-membership-v1</guid><description>Here is the first version of an Excel VBA program to model the membership of the Institute and Faculty of Actuaries (or any similar professional body). It may be freely used by others under the Creative Commons License. I have produced this in an attempt to help actuaries and others ...</description><content:encoded><![CDATA[<p>At <a href="https://cdn.buttercms.com/HDeRbviAR3mxkgdtVMTW" rel="follow">this link</a> is the first version of an Excel VBA program to model the membership of the Institute and Faculty of Actuaries (or any similar professional body).&nbsp; It may be freely used by others under the Creative Commons License.</p>
<p>(<em>NB: the link is to a zip file containing an Excel xlsm file.&nbsp; Because that contains VBA code, it may be blocked by Microsoft Windows.&nbsp; If so, to unblock it, see <a href="https://support.microsoft.com/en-gb/topic/a-potentially-dangerous-macro-has-been-blocked-0952faa0-37e7-4316-b61d-5b5ed6024216" rel="follow">https://support.microsoft.com/en-gb/topic/a-potentially-dangerous-macro-has-been-blocked-0952faa0-37e7-4316-b61d-5b5ed6024216</a></em>).</p>
<p>I have produced this in an attempt to help actuaries and others try and find out some key information which the IFoA has not to date been very transparent about:</p>
<p>-the student drop out rate (i.e. what percentage of students never complete the exams)</p>
<p>-what percentages of students qualify in what time (if they qualify)</p>
<p>- what the Fellow drop out rate is (i.e. what percentage of qualified actuaries leave the IFoA before retirement).</p>
<p>The model has a ReadMe page with instructions:</p>
<p><img src="https://cdn.buttercms.com/o4SKqTxcTmG8NN6nFssa" alt="PJL IFoA Model ReadMe1.webp" /></p>
<p></p>
<p>Screenshot of the inputs (and the button to run the VBA program):</p>
<p><img src="https://cdn.buttercms.com/w48PBkUVR65E0QIDzuGg" alt="PJL IFoA Model Inputs1.webp" /></p>
<p>Screenshot of the ModelOutput worksheet (which contains the initial population of students and fellows projected forward 100 years (which should be long enough to reach a steady state unless a long initial period of growth has been selected):</p>
<p><img src="https://cdn.buttercms.com/CCr2pIDAR9u0SPpmy1TO" alt="PJL IFoA Model Outputs1.webp" /></p>
<p>Screenshot of the PivotChart worksheet which is linked to the ModelOutput (its data source needs to be refreshed after a run).&nbsp; You can change the fields and filters you want to look at here.</p>
<p><img src="https://cdn.buttercms.com/MUJ2A9fzS9OKRNJQhPmE" alt="PJL IFoA Model Outputs PivotChart1.webp" /></p>
<p>I invite fellow IFoA members to play around with the model.&nbsp; It seems very difficult to put in decrement rates that fit with the IFoA's past assertion that the average qualification time is 7 years (or 5 years has also been mentioned) and also with the published membership student and Fellow population profiles that appear from time to time on the IFoA's website.</p>
<p>The best thing would be for the IFoA to publish detailed statistics on student qualification times, student and fellow drop out rates of course.</p>
<p></p>]]></content:encoded></item><item><title>No Application Insights requests or exceptions showing for .NET 5 and 6 app services? Need to configure the project within Visual Studio</title><link>https://pjlee.net/blog/no-application-insights-requests-or-exceptions-showing-for-net-5-and-6-app-services-need-to-configur</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 25 Aug 2022 21:06:00 +0000</pubDate><guid>https://pjlee.net/blog/no-application-insights-requests-or-exceptions-showing-for-net-5-and-6-app-services-need-to-configur</guid><description>If App Insights is not showing any data for a .NET 6 (or 5) web app, configure it within Visual Studio</description><content:encoded><![CDATA[<p>I mentioned before that getting Applications Insights to work with a .NET 5 web app was a bit buggy (see <a href="https://pjlee.net/blog/application-insights-is-not-fully-supported-for-net-50-but-you-can-configure-it-manually" rel="follow">https://pjlee.net/blog/application-insights-is-not-fully-supported-for-net-50-but-you-can-configure-it-manually</a>).</p>
<p>Well although the link in the Azure portal to App Insights is not disabled for a .NET 6 web app, you can still find that despite everything appearing to be properly configured within the portal, no data (requests, traces, exceptions etc) appear in the App Insights logs.</p>
<p>As with my previous post on .NET 5, the solution seems to be to right click the project within Solution Explorer in Visual Studio and configure App Insights from there.</p>
<p>That adds code within the start up (in Program.cs for a .NET 6 web app) which seems to wake up whatever was asleep in Application Insights.</p>
<p></p>]]></content:encoded></item><item><title>Microsoft Graph: to change user passwords, an app can't use API permissions instead just needs User Administrator role</title><link>https://pjlee.net/blog/microsoft-graph-to-change-user-passwords-an-app-cant-use-api-permissions-instead-just-needs-user-adm</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 25 Aug 2022 20:57:00 +0000</pubDate><guid>https://pjlee.net/blog/microsoft-graph-to-change-user-passwords-an-app-cant-use-api-permissions-instead-just-needs-user-adm</guid><description>User Administrator (or similar) role is needed for a registered app to change a user's passwords within Microsoft Graph.</description><content:encoded><![CDATA[<p>The documentation for Microsoft Graph is not as good as it should be in my opinion.&nbsp;</p>
<p>If you want a registered app of yours to be able to change users' passwords then although you can add, edit and delete user profiles via granting the app API permissions within Microsoft Graph, the app can't change users' passwords (at least not with application permissions [running as the application]).</p>
<p>Instead, you can add, edit and delete users, and also change their passwords (via the Update [patch] method on the user, either via the Graph API SDK or via calling the REST API) without any Graph API permissions, but instead giving your app an Identity (managed identity) and giving that identity User Administrator role.&nbsp; This can be used within Azure Active Directory, or an ADB2C directory.</p>
<p>(Adding a role to a new app is easy. Finding out which roles an existing app already has is <strong>not </strong>easy - see <a href="https://pjlee.net/blog/a-hole-in-azure-active-directory-microsoft-ought-to-list-the-roles-a-registered-application-has" rel="follow">this post</a>).</p>]]></content:encoded></item><item><title>A hole in Azure Active Directory: Microsoft ought to list the roles a registered application has</title><link>https://pjlee.net/blog/a-hole-in-azure-active-directory-microsoft-ought-to-list-the-roles-a-registered-application-has</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 25 Aug 2022 20:45:00 +0000</pubDate><guid>https://pjlee.net/blog/a-hole-in-azure-active-directory-microsoft-ought-to-list-the-roles-a-registered-application-has</guid><description>It is very hard to find out what roles an app has been granted. When you add a role, document this within the notes section of the app's blade in the Azure portal. Microsoft ought to fix this.</description><content:encoded><![CDATA[<h2>A glaring hole in the Azure portal for Azure Active Directory</h2>
<p>At present, the user interface is terrible to find role assignments in the Azure portal: there does not seem to be any way to find the roles assigned to a particular registered app.</p>
<p>Instead, you have to select a role and then you can find which apps have been assigned to that role. But there are dozens of roles, so you would have to try them all to see which roles a particular app has!</p>
<p>Microsoft should fix this by adding a Roles link when you select a particular registered app, showing the roles that have been assigned to that app.</p>
<h2>Leave a trail (for yourself and the rest of the team)</h2>
<p>So if you add a role to an app, to make this self-documenting, add a description to the app in the Internal notes section:</p>
<p>This registered app is used. It does not need any API permissions (no API permissions allow user passwords to be changed). Instead it just needs User Administrator role.</p>
<p></p>
<p></p>
<p></p>
<p></p>]]></content:encoded></item><item><title>Running out of disk space on a Windows pc? TreeSize may help, beware OneNote cache and backup folders</title><link>https://pjlee.net/blog/running-out-of-disk-space-on-a-windows-pc-treelist-may-help-beware-onenote-cache-and-backup-folders</link><media:content medium="image" url="https://cdn.buttercms.com/mjQDLAPtTxSH57Lq7cCt" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 19 Jun 2022 10:37:00 +0000</pubDate><guid>https://pjlee.net/blog/running-out-of-disk-space-on-a-windows-pc-treelist-may-help-beware-onenote-cache-and-backup-folders</guid><description>I have been finding that on several pcs that I use, the free space on the C drive has been reducing constantly over time. The existing tools within Windows 10 didn't help as they don't make it easy to find out where the large files and folders are, and the ...</description><content:encoded><![CDATA[<p>I have been finding that on several pcs that I use, the free space on the C drive has been reducing constantly over time.</p>
<p>The existing tools within Windows 10 didn't help as they don't make it easy to find out where the large files and folders are, and the tools on the disk don't seem to cover clearing user/AppData/Local.</p>
<p>The free version of <a href="https://customers.jam-software.de/downloadTrialProcess.php" rel="follow">TreeSize</a>&nbsp;(*) was very useful in identifying the problem: OneNote backup and cache folders.&nbsp; (I use OneNote extensively, as a sort of personal StackOverflow for recording work done, problems encountered and how solved).</p>
<p>https://superuser.com/questions/1468754/onenote-reducing-storage-footprint-on-pc was very helpful in this regard, I was able to change the location of OneNote's cache and backup folders to a separate fixed drive within the pc.</p>
<p>Update * : I have just bought the paid for version as a thank you to the JamSoftware team for helping me identify the problem.</p>]]></content:encoded></item><item><title>Want to move large files/large numbers of files to/from Azure Storage? Use AzCopy or Microsoft Azure Storage Data Movement</title><link>https://pjlee.net/blog/want-to-move-large-fileslarge-numbers-of-files-tofrom-azure-storage-use-azcopy-or-microsoft-azure-st</link><media:content medium="image" url="https://cdn.buttercms.com/R7GozCKtTb2VlTD9yPMO" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 20 May 2022 07:59:00 +0000</pubDate><guid>https://pjlee.net/blog/want-to-move-large-fileslarge-numbers-of-files-tofrom-azure-storage-use-azcopy-or-microsoft-azure-st</guid><description>If you need to move thousands of Azure blobs, or very large ones (many GB) then you can either use AzCopy (a command line tool which you run locally), or if you want to do things programmatically, you can use the Microsoft Azure Storage Data Movement library. That library is ...</description><content:encoded><![CDATA[<p>If you need to move thousands of Azure blobs, or very large ones (many GB) then you can either use AzCopy (a command line tool which you run locally), or if you want to do things programmatically, you can use the Microsoft Azure Storage Data Movement library.&nbsp; That library is apparently what AzCopy uses behind the scenes.</p>
<p>(For some reason, Microsoft don't link to the data movement library from their page about AzCopy - they should do).</p>
<p>See here for<a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10" rel="follow"> AzCopy</a> and <a href="https://github.com/Azure/azure-storage-net-data-movement/blob/master/README.md" rel="follow">here</a> for the Data Movement library.</p>
<p></p>]]></content:encoded></item><item><title>How to extend the timeout for Azure functions beyond the default limits - use AzureFunctionsJobHost__functionTimeout setting</title><link>https://pjlee.net/blog/how-to-extend-the-timeout-for-azure-functions-beyond-the-default-limits-use-azurefunctionsjobhost__f</link><media:content medium="image" url="https://cdn.buttercms.com/R7GozCKtTb2VlTD9yPMO" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 20 May 2022 07:46:00 +0000</pubDate><guid>https://pjlee.net/blog/how-to-extend-the-timeout-for-azure-functions-beyond-the-default-limits-use-azurefunctionsjobhost__f</guid><description>By default, Azure functions timeout after 10 minutes (or 30 minutes if running in an App Service Plan, or a Premium plan). The official documentation (see https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout) says that you can increase (or reduce) this by adding a functionTimeout value to host.json. But this doesn't seem to work for a ...</description><content:encoded><![CDATA[<p>By default, Azure functions timeout after 10 minutes (or 30 minutes if running in an App Service Plan, or a Premium plan).</p>
<p>The official documentation (see <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout" rel="follow">https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout</a>) says that you can increase (or reduce) this by adding a functionTimeout value to host.json.</p>
<p></p>
<p><strong>But this doesn't currently work for a .NET 6 Azure function (v4)&nbsp; (the latest version)!</strong></p>
<p></p>
<p>Instead, (my thanks to <a href="https://github.com/paulbatum" rel="follow">https://github.com/paulbatum</a> who disclosed this trick on <a href="https://github.com/Azure/azure-functions-host/issues/6111" rel="follow">https://github.com/Azure/azure-functions-host/issues/6111</a>) adding this setting AzureFunctionsJobHost__functionTimeout in app.settings.json (or in Configuration in the portal) works, e.g. for 23 hours:</p>
<p>"AzureFunctionsJobHost__functionTimeout": "23:00:00"</p>
<p></p>
<p></p>
<p></p>]]></content:encoded></item><item><title>Working towards a Pensions Dashboard</title><link>https://pjlee.net/blog/working-towards-a-pensions-dashboard</link><media:content medium="image" url="https://cdn.buttercms.com/Pj5gfMb3R2euenCCbt3G" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 08 May 2022 21:08:00 +0000</pubDate><guid>https://pjlee.net/blog/working-towards-a-pensions-dashboard</guid><description>I am creating a prototype, suitable for use with the UK's Pensions Dashboard project.  Early days, but have made good progress so far!  More in due course.</description><content:encoded><![CDATA[<p>I am creating a prototype, suitable for use with the UK's <a href="https://www.pensionsdashboardsprogramme.org.uk/" rel="follow">Pensions Dashboard</a> project.&nbsp; Early days, but have made good progress so far!&nbsp; More in due course.</p>]]></content:encoded></item><item><title>How to trigger and query an Azure Entity Function without using an ordinary function - just use the built in HTTP webhooks!</title><link>https://pjlee.net/blog/how-to-trigger-and-query-an-azure-entity-function-without-using-an-ordinary-function-just-use-the-bu</link><media:content medium="image" url="https://cdn.buttercms.com/R7GozCKtTb2VlTD9yPMO" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 08 May 2022 20:33:00 +0000</pubDate><guid>https://pjlee.net/blog/how-to-trigger-and-query-an-azure-entity-function-without-using-an-ordinary-function-just-use-the-bu</guid><description>A simpler way to create and query Azure Entity Functions (previously called Durable Entities): just use the built in webhooks.</description><content:encoded><![CDATA[<p>I recently revisited creating Entity Functions (previously called&nbsp; Durable Entities) for a long running task, which needs to be queried as to its progress.</p>
<p>In the past I have had to use a standard Azure function to trigger a Durable Entity, but recently discovered that this isn't necessary.</p>
<p>Instead (see https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api) Azure provides webhooks that you can call.</p>
<h1>First, create the entity by calling an operation on it via a POST call</h1>
<p>You first need to create the entity by calling an operation on it, via a url similar to the following:&nbsp;</p>
<p><code>POST /runtime/webhooks/durabletask/entities/{entityName}/{entityKey}</code><br /><code>&nbsp; &nbsp; ?taskHub={taskHub}</code><br /><code>&nbsp; &nbsp; &amp;connection={connectionName}</code><br /><code>&nbsp; &nbsp; &amp;code={systemKey}</code><br /><code>&nbsp; &nbsp; &amp;op={operationName}</code></p>
<p></p>
<p>That will both create the instance of the Entity (of type entityName and with uniqueId entityKey) and call the operation called operationName on it.</p>
<p>It should return a 202 Accepted code.</p>
<h1>Query the state of the entity (e.g. progress) via a GET call</h1>
<p>Once the entity has been created you can then get the exposed state of the entity via a url similar to the following</p>
<p><code>GET /runtime/webhooks/durabletask/instances/{instanceId}</code><br /><code>&nbsp; &nbsp; ?taskHub={taskHub}</code><br /><code>&nbsp; &nbsp; &amp;connection={connectionName}</code><br /><code>&nbsp; &nbsp; &amp;code={systemKey}</code><br /><code>&nbsp; &nbsp; &amp;showHistory=[true|false]</code><br /><code>&nbsp; &nbsp; &amp;showHistoryOutput=[true|false]</code><br /><code>&nbsp; &nbsp; &amp;showInput=[true|false]</code><br /><code>&nbsp; &nbsp; &amp;returnInternalServerErrorOnFailure=[true|false]</code></p>
<p>This should return a 200 OK code, with a body showing the publicly exposed properties of the entity.</p>
<h1>Conclusion</h1>
<p>Using these built in webhooks means that you can avoid having to create a separate (non durable) Azure function and an associated trigger for that function.</p>
<p>Very neat!</p>]]></content:encoded></item><item><title>Some Microsoft Professional certifications passed</title><link>https://pjlee.net/blog/some-microsoft-professional-exams-i-took-and-passed</link><media:content medium="image" url="https://cdn.buttercms.com/7Rrjy9ECTZmXTSOjwXcB" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 01 May 2022 16:49:00 +0000</pubDate><guid>https://pjlee.net/blog/some-microsoft-professional-exams-i-took-and-passed</guid><description>Both last year and this year I took (and passed) a Microsoft exam (I suppose the equivalent of CPD - Continuing Professional Development). Last year it was Programming in C# (certification: here ), and this year it was Microsoft Certified: Azure Developer Associate (certification: here ).</description><content:encoded><![CDATA[<p>Both last year and this year I took (and passed) a Microsoft exam (I suppose the equivalent of CPD - Continuing Professional Development).&nbsp;&nbsp;</p>
<p>Last year it was Programming in C# (certification: <a href="https://www.credly.com/badges/93fe7e4e-5886-4e1c-b643-8dc3f89f78bb" rel="follow">here</a>), and this year it was Microsoft Certified: Azure Developer Associate (certification: <a href="https://www.credly.com/badges/26c4a3fe-7155-4d65-b1bf-d9dbb4affec1" rel="follow">here</a>).</p>
<p>These exams were online, but unlike the Institute and Faculty of Actuaries' online exams (which are un-proctored with allegations of significant cheating going on by a minority of students), these Microsoft exams are proctored using Pearson Vue.</p>
<p>I really don't understand why the IFoA has not done something similar: it is unfair to the majority of conscientious students (and to everyone who has already taken and passed the exam without cheating) to allow a significant minority to cheat.&nbsp;</p>]]></content:encoded></item><item><title>The IFoA's new website has a terrible search facility - here are two ways you can search it much more effectively</title><link>https://pjlee.net/blog/the-ifoas-new-website-has-a-terrible-search-facility-here-are-two-ways-you-can-search-it-much-more-e</link><media:content medium="image" url="https://cdn.buttercms.com/cMJZfMZbToeet03ESuOO" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 30 Apr 2022 22:39:00 +0000</pubDate><guid>https://pjlee.net/blog/the-ifoas-new-website-has-a-terrible-search-facility-here-are-two-ways-you-can-search-it-much-more-e</guid><description>The new website's search facility is of little practical use The Institute and Faculty of Actuaries has recently upgraded its website, with a new look. Unfortunately, the search facility is far worse than it was before. For example, if you search for "member pledge" you currently get this result: We ...</description><content:encoded><![CDATA[<h1>The new website's search facility is of little practical use</h1>
<p>The Institute and Faculty of Actuaries has recently upgraded its <a href="https://www.actuaries.org.uk/" rel="follow">website</a>, with a new look.</p>
<p>Unfortunately, the search facility is far worse than it was before.&nbsp; For example, if you search for "member pledge"&nbsp; you currently get this result:</p>
<p><img src="https://cdn.buttercms.com/bwDWGdXQTP6kOd1mXIgU" alt="undefined" /></p>
<blockquote>
<p><em>We couldn't find a match for "<strong>member pledge</strong>". Please try another search.</em></p>
<p><em></em></p>
</blockquote>
<p><span>So for practical purposes the signposted search facility within the IFoA's new website is of little use: you will miss relevant documents, or worse (as we saw with the member pledge) think that no relevant documents exist.</span></p>
<h1><span>Two ways to still have a good search experience on the site</span></h1>
<p><span>The first is that you can (for the moment, unless they remove it) still go to their <strong>old site search facility</strong> at&nbsp;</span><span></span><span><a href="https://www.actuaries.org.uk/search/site" rel="follow">https://www.actuaries.org.uk/search/site</a> and enter in your search term there.&nbsp;&nbsp;</span></p>
<p>E.g. entering member pledge is equivalent to going to <a href="https://www.actuaries.org.uk/search/site/member%2520pledge" rel="follow">https://www.actuaries.org.uk/search/site/member%2520pledge</a> and that brings up lots of results, including the <a href="https://www.actuaries.org.uk/about-us/our-member-pledge" rel="follow">Member Pledge</a> page, and on the right hand side some options to filter the results down further.</p>
<p>The second is a<strong> standard way to use Google to search within a site</strong>.&nbsp; In Google's search bar, just prefix your search term by site:urlofthesite, e.g. here site:actuaries.org.uk</p>
<p>So a search for member pledge is&nbsp;</p>
<p>site:actuaries.org.uk member pledge</p>
<p>which is equivalent to h<a href="ttps://www.google.com/search?q=site%3Aactuaries.org.uk+member+pledge&amp;oq=site%3Aactuaries.org.uk+member+pledge" rel="follow">ttps://www.google.com/search?q=site%3Aactuaries.org.uk+member+pledge&amp;oq=site%3Aactuaries.org.uk+member+pledge</a></p>
<p>which brings up lots of pages:&nbsp;</p>
<p><img src="https://cdn.buttercms.com/Fj4jY4r9RyuTwD6ZAi9t" alt="HowToSearchIFoAWebsite30Apr2022.png" /></p>
<p></p>]]></content:encoded></item><item><title>How to use Application Insights to get the most requested pages in a website</title><link>https://pjlee.net/blog/how-to-use-application-insights-to-get-the-most-requested-pages-in-a-website</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 30 Apr 2022 22:12:00 +0000</pubDate><guid>https://pjlee.net/blog/how-to-use-application-insights-to-get-the-most-requested-pages-in-a-website</guid><description>This shows you how to add a simple Application Insights query to get your top requested pages which you can then add (pin) to an Azure dashboard.</description><content:encoded><![CDATA[<p>Microsoft's Application Insights is very useful for supporting customers / tracking errors etc.&nbsp;</p>
<p>It uses the kusto querying language, which is subtly different to SQL so it takes a bit of getting used to in order to get the queries you want.&nbsp; (NB you might find this&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><a href="https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/sqlcheatsheet" title="Kusto to SQL cheatsheet" rel="follow">Kusto to SQL cheatsheet</a> useful).<a href="https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/sqlcheatsheet"></a></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"></p>
<h1>Kusto query to get top items in descending order</h1>
<p>Here is a very easy way to get a table (or chart, but the urls are hard to see in the chart because they are too long for a chart axis marker) of the top requests made to a website using kusto:</p>
<p><code>requests&nbsp;</code><br /><code>| summarize count() by url</code><br /><code>| order by count_</code></p>
<p></p>
<p>You can filter the requests, e.g. to ignore the home page, or to exclude robots.txt by putting a | where query before the summarize operator</p>
<p><code>requests&nbsp;<br />| where url != 'https://pjlee.net/'&nbsp;<br />&nbsp; &nbsp;and url != 'https://www.pjlee.net/'<br />&nbsp; &nbsp; and url != 'http://pjlee.net/'<br />&nbsp; &nbsp; and url != 'http://www.pjlee.net/'<br />&nbsp; &nbsp; and not(url contains '.ico')<br />&nbsp; &nbsp; and not(url contains '.js')<br />&nbsp; &nbsp; and not(url contains '.css')<br />&nbsp; &nbsp; and not(url contains '.txt') &nbsp;<br />&nbsp; &nbsp; and not(url contains '.php') &nbsp;<br />| summarize count() by url<br />| order by count_</code></p>
<p>You can run this in the Application Insights logs page for your site (selecting a suitable time period), and then pin it to an Azure dashboard.</p>
<p>You can also get charts of counts of requests summarized for each day and include those on the same dashboard.</p>]]></content:encoded></item><item><title>RSS Feed for this blog</title><link>https://pjlee.net/blog/rss-feed-for-this-blog</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 30 Apr 2022 16:43:00 +0000</pubDate><guid>https://pjlee.net/blog/rss-feed-for-this-blog</guid><description>Where to find the link for an RSS feed to this blog.</description><content:encoded><![CDATA[<p>I recently added an RSS feed for this blog - it is at <a href="https://www.pjlee.net/feeds/rss" title="RSS feed for my blog" rel="follow">https://www.pjlee.net/feeds/rss</a>.</p>]]></content:encoded></item><item><title>Visual Studio 2022: my experience so far</title><link>https://pjlee.net/blog/visual-studio-2022-my-experience-so-far</link><media:content medium="image" url="https://cdn.buttercms.com/zC5AeOKoTziC9c6X03rN" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 30 Apr 2022 16:26:00 +0000</pubDate><guid>https://pjlee.net/blog/visual-studio-2022-my-experience-so-far</guid><description>My experience so far of Visual Studio 2022: the good (AI enabled Intellicode, being able to edit and continue during debugging), the bad (some false positive errors, need to revert to Visual Studio 2019 for adding code migrations via Package Manager Console).  But overall I like it.</description><content:encoded><![CDATA[<p>I have been using Visual Studio 2022 for about 5 months so far. Here are some observations based on my experience of it so far:</p>
<h2>Improvements</h2>
<p>I really like the AI enabled Intellicode feature: it suggests code as you type and if you like the suggestion you can accept it by just pressing the Tab key.&nbsp; This works quite well and saves quite a lot of typing compared to Visual Studio 2019.</p>
<p>I haven't really noticed/used any other improvements yet other than Hot Reload: the ability to change code while debugging and continue without having to completely restart the debugging session.</p>
<h2>Oddities/Bugs</h2>
<p>Visual Studio 2022 quite often gives <strong>false positive</strong> error messages (i.e. error messages when there really hasn't been an error), either when publishing to Azure, or when pushing changes to Git.&nbsp;</p>
<p>If you want to do code migrations to an Azure SQL database in a project that is still using .NET Framework and Entity Framework (rather than&nbsp; Entity Framework Core) using the Nuget Package Manager Console, then I found I had to revert to using Visual Studio 2019.&nbsp; Visual Studio 2022 kept on giving errors.</p>
<p>But overall, the AI Intellicode means that I like Visual Studio 2022 .</p>]]></content:encoded></item><item><title>Converting a .NET 5 web app to a .NET 6 one</title><link>https://pjlee.net/blog/converting-a-net-5-web-app-to-a-net-6-one</link><media:content medium="image" url="https://cdn.buttercms.com/zC5AeOKoTziC9c6X03rN" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 30 Apr 2022 16:05:00 +0000</pubDate><guid>https://pjlee.net/blog/converting-a-net-5-web-app-to-a-net-6-one</guid><description>It is relatively easy to remove the use of a Startup.cs file after converting a web project from .NET 5.0 to .NET 6.0.  This post shows how I did it.</description><content:encoded><![CDATA[<p>I mentioned in this <a href="https://www.pjlee.net/blog/this-site-now-updated-to-use-net-60" title="Updated this site from .NET 5 to .NET 6" rel="follow">previous post</a>&nbsp;that I had upgraded this site from .NET 5 to .NET 6.</p>
<p>One thing I hadn't done is remove the usage of Startup.cs file.</p>
<p>.NET 5 websites by default have both a Program.cs and a Startup.cs file.</p>
<p>.NET 6 websites only have a Program.cs file.</p>
<p>I had updated the site to .NET 6 merely by changing the target framework in the project's properties), but I had left the existing Program.cs and Startup.cs files unchanged.</p>
<p></p>
<h2>Removing the Startup.cs file</h2>
<p>Today I wanted to see if I could remove the Startup.cs file.&nbsp;</p>
<p>It turned out this was relatively easy for my project:</p>
<p>I first replaced the contents of Program.cs by the contents of the Program.cs of a standard new .NET 6 MVC website that I added temporarily to my Visual Studio 2022 solution.&nbsp;</p>
<p>I then got&nbsp;a compile error on the very first line of Program.cs:</p>
<p>The name 'WebApplication' does not exist in the current context.</p>
<p>Comparing the contents of my project's&nbsp; .csproj file with that&nbsp; of the standard new .NET 6 project showed that the latter uses ImplicitUsings.</p>
<p>Adding &nbsp;</p>
<p><code>&lt;ImplicitUsings&gt;enable&lt;/ImplicitUsings&gt; </code></p>
<p>to the PropertyGroup in my project file solved the compile problem.</p>
<p>After that, I just had to add some services (previously in Startup.cs) in Program.cs (NB the syntax in Program.cs is slightly different: builder.Services.Add ..) and I was then able to delete the Startup.cs file.</p>]]></content:encoded></item><item><title>This site now updated to use .NET 6.0</title><link>https://pjlee.net/blog/this-site-now-updated-to-use-net-60</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 23 Apr 2022 21:28:00 +0000</pubDate><guid>https://pjlee.net/blog/this-site-now-updated-to-use-net-60</guid><description>I have just updated this site from .NET 5.0 (apart from an associated Azure function which was still .NET Core 3.1) to .NET 6.0 (for both the site and the function).</description><content:encoded><![CDATA[<p>I have just updated this site from .NET 5.0 (apart from an associated Azure function which was still .NET Core 3.1) to .NET 6.0 (for both the site and the function).</p>
<p>It wasn't very difficult to upgrade the web app project from .NET 5 to .NET 6 (just changing the target framework). but I also updated various Nuget packages and changed from &nbsp;Microsoft.Azure.Cosmos.Table (shown as deprecated) to Azure.Data.Tables, which took quite a bit of time. &nbsp;(Why do Microsoft make changes so often: the last time was &lt; 2 years ago from Microsoft.WindowsAzure.Storage to Microsoft.Azure.Cosmos.Table, and with the code needing to change in a far from obvious way?)</p>
<p>I also had some problems with the function. Although it seemed to upgrade from .NET Core 3.1 to .NET 6 fine (after upgrading the functions SDK) and it built ok, I got an error at run time. I had to remove some extra tmp csproj file that was there, which seemed to maintain a link to .net core 2.2. &nbsp;After that it seemed to build and run ok.</p>]]></content:encoded></item><item><title>Azure Durable Functions: not necessarily suitable for orchestrating large numbers of tasks</title><link>https://pjlee.net/blog/azure-durable-functions-not-necessarily-suitable-for-orchestrating-large-numbers-of-tasks</link><media:content medium="image" url="https://cdn.buttercms.com/HnYjfr3tRfi22Fyd4XTJ" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 20 Apr 2021 21:12:00 +0000</pubDate><guid>https://pjlee.net/blog/azure-durable-functions-not-necessarily-suitable-for-orchestrating-large-numbers-of-tasks</guid><description>Microsoft's Durable Functions (see https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp ) are a very useful tool for performing some complex tasks in a robust serverless way. But in situations where there is a large number of different tasks involved, they introduce their own overhead which can slow things down significantly. This is because if there ...</description><content:encoded><![CDATA[<p>Microsoft's Durable Functions (see <a href="https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp" rel="follow">https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp</a>) are a very useful tool for performing some complex tasks in a robust serverless way.&nbsp; But in situations where there is a large number of different tasks involved, they introduce their own overhead which can slow things down significantly.</p>
<p>This is because if there are n tasks which need to be orchestrated (in the chaining example at least), the orchestrator will perform 1 + 2 + 3 + 4 + ....&nbsp; + n steps because of the way it "replays" each task by checking on each pass whether it has completed, and if not running it.</p>
<p>So this means n(n+1)/2 = n^2 + n/2 steps, which beyond say 500 tasks introduces quite a big overhead in running time.</p>
<p>So if you have a very large number of tasks, then it may be better to use older techniques for long running tasks, e.g. running as a WebJob, or running on a virtual machine, or sending each task to a function triggered by a queue, or using Azure Batch.</p>]]></content:encoded></item><item><title>This site now updated to use .NET 5.0</title><link>https://pjlee.net/blog/this-site-now-updated-to-use-net-50</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 03 Feb 2021 08:37:00 +0000</pubDate><guid>https://pjlee.net/blog/this-site-now-updated-to-use-net-50</guid><description>As mentioned in this article, updating this from .NET Core 3.1 to .NET 5.0 was quite straightforward.</description><content:encoded><![CDATA[<p>As mentioned in <a href="https://pjlee.azurewebsites.net/blog/migrating-from-net-core-31-to-net-50-reasonably-straightforward-apart-from-for-functions" rel="follow">this article</a>, updating this from .NET Core 3.1 to .NET 5.0 was quite straightforward, although&nbsp; the Azure functions backing it can't yet be upgraded until Azure Functions start supporting .NET 5.0.</p>]]></content:encoded></item><item><title>Application Insights is not fully supported for .NET 5.0, but you can configure it manually</title><link>https://pjlee.net/blog/application-insights-is-not-fully-supported-for-net-50-but-you-can-configure-it-manually</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 03 Feb 2021 04:05:00 +0000</pubDate><guid>https://pjlee.net/blog/application-insights-is-not-fully-supported-for-net-50-but-you-can-configure-it-manually</guid><description>If you look at a .NET 5.0 App Service (website) in the Azure portal, you will currently (3 Feb 2021) see that the Applications Insight link in the left hand menu is disabled, with a tooltip when you hover over it saying that Application Insights is not yet supported for ...</description><content:encoded><![CDATA[<p>If you look at a .NET 5.0 App Service (website) in the Azure portal, you will currently (3 Feb 2021) see that the Applications Insight link in the left hand menu is disabled, with a tooltip when you hover over it saying that Application Insights is not yet supported for .NET 5.0.</p>
<p></p>
<p>However, I have found that you <strong>can</strong> use Application Insights with a .NET 5.0 website, you just have to configure it from within Visual Studio 2019.</p>
<p>Doing that will add the Microsoft.ApplicationInsights.AspNetCore v 2.15.0 nuget package to the project, and it will add the telemetry service to the Startup class:</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void ConfigureServices(IServiceCollection services)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; services.AddControllersWithViews();</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; services.AddApplicationInsightsTelemetry(Configuration["APPINSIGHTS_CONNECTIONSTRING"]);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>After that when you publish the website to Azure, although the Applications Insight link in the left hand menu is still disabled, there will be another link near the top of the Overview view which you can click to configure/view Application Insights.</p>]]></content:encoded></item><item><title>Azure Functions: beware the Monitor which often misses information, use logs instead</title><link>https://pjlee.net/blog/azure-functions-beware-the-monitor-which-often-misses-information-use-logs-instead</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 03 Feb 2021 04:00:00 +0000</pubDate><guid>https://pjlee.net/blog/azure-functions-beware-the-monitor-which-often-misses-information-use-logs-instead</guid><description>A quick note to warn users of Microsoft's Azure functions: I have quite often found that the Monitor facility misses out showing some recent function runs. Querying the Application Insights logs for traces, requests and exceptions is more reliable.</description><content:encoded><![CDATA[<p>A quick note to warn users of Microsoft's Azure functions: I have quite often found that the Monitor facility misses out showing some recent function runs. Querying the Application Insights logs for traces, requests and exceptions is more reliable.</p>]]></content:encoded></item><item><title>My music playing</title><link>https://pjlee.net/blog/my-music-playing</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 09 Jan 2021 00:00:00 +0000</pubDate><guid>https://pjlee.net/blog/my-music-playing</guid><description>For many years I have been active in music as well as in software, playing piano or double bass. For a glimpse of this other side of me, I am going to put up some tracks or videos. I have just put a couple of sound files on SoundCloud - ...</description><content:encoded><![CDATA[<p>For many years I have been active in music as well as in software, playing piano or double bass.&nbsp; For a glimpse of this other side of me, I am going to put up some tracks or videos. I have just put a couple of sound files on SoundCloud - you can listen to them on <a href="https://soundcloud.com/patrick-lee-86" rel="follow">https://soundcloud.com/patrick-lee-86</a>, including some Bach, Brahms, and also some jazz.</p>]]></content:encoded></item><item><title>Migrating from .NET Core 3.1 to .NET 5.0: reasonably straightforward apart from for functions</title><link>https://pjlee.net/blog/migrating-from-net-core-31-to-net-50-reasonably-straightforward-apart-from-for-functions</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 22 Dec 2020 09:04:00 +0000</pubDate><guid>https://pjlee.net/blog/migrating-from-net-core-31-to-net-50-reasonably-straightforward-apart-from-for-functions</guid><description>A quick blog post about migrating from .NET Core 3.1 to .NET 5.0. I have found this reasonably straightforward in a number of projects, with some exceptions: There is still no .NET 5.0 version of Azure functions so they have to remain .NET Core 3.1 for the time being in ...</description><content:encoded><![CDATA[<p>A quick blog post about migrating from .NET Core 3.1 to .NET 5.0.&nbsp;</p>
<p></p>
<p>I have found this reasonably straightforward in a number of projects, with some exceptions:</p>
<ul>
<li>There is still no .NET 5.0 version of Azure functions so they have to remain .NET Core 3.1 for the time being</li>
<li>in some cases, I have had to stick with the 3.x versions of Entity Framework Core, rather than the 5.x versions.</li>
</ul>
<p>More when I have time.</p>]]></content:encoded></item><item><title>CourtingCatastrophe.com: a new service to help lawyers and others report problems at criminal justice venues</title><link>https://pjlee.net/blog/courting-catastrophe-a-new-service-to-help-lawyers-and-others-report-problems-at-criminal-justice-ve</link><media:content medium="image" url="https://cdn.buttercms.com/dtQSdizySOxduKWksWlQ" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 08 Oct 2020 01:18:00 +0000</pubDate><guid>https://pjlee.net/blog/courting-catastrophe-a-new-service-to-help-lawyers-and-others-report-problems-at-criminal-justice-ve</guid><description>I follow various barristers, solicitors and police accounts on Twitter and have been aware for some time that the criminal justice system in the UK has been subjected to underfunding for many years. At times, I'm told that working conditions are unsanitary or even unsafe. I have set up a ...</description><content:encoded><![CDATA[<p>I follow various barristers, solicitors and police accounts on Twitter and have been aware for some time that the criminal justice system in the UK has been subjected to underfunding for many years.&nbsp;</p>
<p>At times, I'm told that working conditions are unsanitary or even unsafe.</p>
<p>I have set up a new website, <a href="https://courtingcatastrophe.com" rel="follow">https://courtingcatastrophe.com</a> where professionals involved can log problems at such venues, in the hope that this will help bring about safer/better working conditions.</p>
<p>The site is designed to allow users to report problems using a smart phone or tablet, provided they are connected to the internet.</p>
<p><img src="https://cdn.buttercms.com/lgk5j7sdS5KasA2MWbvU" alt="undefined" /></p>]]></content:encoded></item><item><title>My software engineering portfolio: some screenshots</title><link>https://pjlee.net/blog/my-software-engineering-portfolio-some-screenshots</link><media:content medium="image" url="https://cdn.buttercms.com/oowVRkqDRMSqIQZ3i3FY" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 07 Oct 2020 05:50:00 +0000</pubDate><guid>https://pjlee.net/blog/my-software-engineering-portfolio-some-screenshots</guid><description>This shows an embedded slideshow from my Smugmug site of my work on various software projects.</description><content:encoded><![CDATA[<p>Below is an embedded slideshow from my <a href="https://patrickjlee.smugmug.com/" rel="follow">Smugmug</a> photos/videos site, showing screenshots of some of my work from various personal or InQA software development projects:</p>
<p></p>
<p><iframe width="800" height="600" src="https://patrickjlee.smugmug.com/frame/slideshow?key=bjvrVX&amp;speed=3&amp;transition=fade&amp;autoStart=1&amp;captions=0&amp;navigation=0&amp;playButton=0&amp;randomize=0&amp;transitionSpeed=2" frameborder="no" scrolling="no"></iframe></p>
<p></p>]]></content:encoded></item><item><title>New version (4.0) available of David Wilkie's Covid19 model</title><link>https://pjlee.net/blog/new-version-40-available-of-david-wilkies-covid19-model</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 10 Apr 2020 22:24:00 +0000</pubDate><guid>https://pjlee.net/blog/new-version-40-available-of-david-wilkies-covid19-model</guid><description>David Wilkie has just published a new version (4.0) of his model for the Covid19 virus, it is available under the 10 April 2020 entry on https://davidwilkieworks.wordpress.com/coronavirus-covid-19/ . This version allows longer delays between infection, symptoms appearing, cases being reporting, and deaths.</description><content:encoded><![CDATA[<p>David Wilkie has just published a new version (4.0) of his model for the Covid19 virus, it is available under the 10 April 2020 entry on&nbsp;<a href="https://davidwilkieworks.wordpress.com/coronavirus-covid-19/">https://davidwilkieworks.wordpress.com/coronavirus-covid-19/</a>.</p>
<p>This version allows longer delays between infection, symptoms appearing, cases being reporting, and deaths.&nbsp;</p>]]></content:encoded></item><item><title>Using Azure Storage? Use the new Nuget Packages or for Tables Microsoft.Azure.CosmosDb.Table</title><link>https://pjlee.net/blog/using-azure-storage-use-the-new-nuget-packages-or-for-tables-microsoftazurecosmosdbtable</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 10 Apr 2020 20:53:00 +0000</pubDate><guid>https://pjlee.net/blog/using-azure-storage-use-the-new-nuget-packages-or-for-tables-microsoftazurecosmosdbtable</guid><description>On 6 April 2020 Microsoft released new versions of Nuget Packages to enable developers to read and write to Azure Storage accounts. For example, to connect to blobs (binary large objects, typically images or files), use the new Azure.Storage.Blobs Nuget package. (e.g. I have just used version 12.4.1). Example of ...</description><content:encoded><![CDATA[<p>Microsoft has recently released new versions of Nuget Packages to enable developers to read and write to Azure Storage accounts,</p>
<p>For example, to connect to blobs (binary large objects, typically images or files), queues (for distributed processing or to enable web apps to scale by decoupling front end from time consuming backend processing), or tables (for unstructured data storage).&nbsp;&nbsp;</p>
<h2>For blobs, queues and files</h2>
<p>Use the new Nuget packages: Azure.Storage.Blobs (e.g. I have just used version 12.4.1), Azure.Storage.Queues and Azure.Storage.Files.Shares respectively.</p>
<h2>For Tables</h2>
<p>Azure Storage Tables provide a cheaper (but less powerful) way of storing relatively simple unstructured data as opposed to the more powerful (and expensive) facility in Azure CosmosDb.&nbsp;&nbsp;</p>
<p>For some reason, there isn't an equivalent package for Azure Storage Tables. Instead, rather than using&nbsp;the previous WindowsAzure.Storage (version 9.3.3) Nuget package, you can use the Microsoft.Azure.CosmosTable Nuget package to connect to Azure Storage Tables.</p>
<h2>Example of using&nbsp;Microsoft.Azure.Cosmos.Table to connect to an Azure Storage Table</h2>
<p>I used version 2.0.0 preview (version 1.0.6 also works) of the package, but an earlier version may also work, I haven't tried this,&nbsp;(There doesn't seem to be any online documentation specifically for this, only for connecting to a CosmosDb table, but similar code seems to work for an Azure Storage Table).</p>
<p>The code below was for an ASP.NET Core 3.1 api web app:</p>
<p>For an Azure storage Table called MyTable, with a corresponding class called MyTableEntity:</p>
<p><code>using Microsoft.Azure.Cosmos.Table; // added for TableEntity</code></p>
<p><code>&nbsp;&nbsp;&nbsp; public class MyTableEntity: TableEntity</code></p>
<p><code>&nbsp;&nbsp;&nbsp; {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public MyTableEntity(string type, string id)</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.PartitionKey = type;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.RowKey = id;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public MyTableEntity() { }</code></p>
<p><code>// put your table's other properties here</code></p>
<p><code>&nbsp;&nbsp;&nbsp; }</code></p>
<p></p>
<p>then in a controller:</p>
<p><code>&nbsp;&nbsp;&nbsp; using Microsoft.Azure.Cosmos.Table;</code></p>
<p>&nbsp;<code>&nbsp;&nbsp;&nbsp;&nbsp; private async Task&lt;List&lt;MyTableEntity&gt;&gt; GetMyTableEntities()</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var myTable = GetMyTable();</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Construct the query operation for all entities where PartitionKey="putpartitionkeyvaluehere";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TableQuery&lt;MyTableEntity&gt; query =</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new TableQuery&lt;MyTableEntity&gt;().Where(</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, "putpartitionkeyvaluehere"));</code></p>
<p><code>&nbsp;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var records = new List&lt;MyTableEntity&gt;();</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TableContinuationToken token = null;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TableQuerySegment&lt;MyTableEntity&gt; resultSegment = await myTable .ExecuteQuerySegmentedAsync(query, token);</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; token = resultSegment.ContinuationToken;</code></p>
<p><code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; records .AddRange((resultSegment.Results));</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } while (token != null);</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return records ;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></p>
<p><code>&nbsp;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private CloudTable GetMyTable()</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp; &nbsp;// use dependency injection to set _config (the configuration) in the controller's constructor or use KeyVault or ManagedIdentity to avoid having to store secrets in settings</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var connectionString = _config.GetValue&lt;string&gt;("AzureStorage:ConnectionString");&nbsp;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CloudTableClient tableClient = storageAccount.CreateCloudTableClient();</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CloudTable myTable = tableClient.GetTableReference("MyTable");</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return myTable;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</code></p>
<p><code>&nbsp;</code></p>
<p><code></code></p>
<p><code></code></p>
<p></p>]]></content:encoded></item><item><title>When is Covid-19 going to peak in the UK? Some analysis from David Wilkie's v3 model</title><link>https://pjlee.net/blog/when-is-covid-19-going-to-peak-in-the-uk-some-analysis-from-david-wilkies-v3-model</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 03 Apr 2020 00:04:00 +0000</pubDate><guid>https://pjlee.net/blog/when-is-covid-19-going-to-peak-in-the-uk-some-analysis-from-david-wilkies-v3-model</guid><description>There is no perfect model, and it seems clear that there is still a lot of uncertainty about how long the Covid-19 virus is infectious for, how long carriers can be both asymptomatic and contagious. The UK government seem to be expecting the current epidemic to peak within a couple ...</description><content:encoded><![CDATA[<p>There is no perfect model, and it seems clear that there is still a lot of uncertainty in many areas, including about how long the Covid-19 virus is infectious for, and how long carriers can be both asymptomatic and contagious. The UK government seem to be expecting the current epidemic to peak within a couple of weeks (i.e. in mid April).&nbsp; Version 3 of David Wilkie's model has been fitted to try and represent the UK situation as at 20 March 2020, and includes various scenarios for how effective the social distancing imposed from about 21 March might be in reducing how much the disease spreads.</p>
<p>See the section entitled "Update 1 April 2020" on <a href="https://davidwilkieworks.wordpress.com/coronavirus-covid-19/" rel="follow">this page</a> of David's website. On that page, David produces full details of his model, including documentation and calculations in Excel.</p>
<p>The model projects the following peak dates (taken as those when the number of deaths is at its maximum), and eventual total number of deaths, under 9 different scenarios:&nbsp;</p>
<p><img src="https://cdn.buttercms.com/UMUTcSrATsWbvxDqkm5W" alt="undefined" /></p>
<p><em>(Please note that these are just from the current outbreak, so ignoring possible further outbreaks later this year or next year. They also ignore any possible overrun on the UK's National Health Service).</em></p>
<p>Scenario A is for illustration on the assumption that the mitigation policy in place before 21 March had remained in place. We know that the Imperial College Covid-19 Response Team's equivalent projection is about 510,000 deaths, so the two models are at odds here. We have to hope that the Imperial College model is more correct, but it seems to me that the challenge that David's model poses at the moment is: it seems coherent, so if it is wrong, in which areas? I have not seen the Imperial College model. Of course, with an epidemic where the number of cases seems to be doubling roughly every 4 days, it may be very easy to over or under-estimate the likely total number of cases by 2 or more, particularly when the true number of cases is unknown.</p>
<p>Scenarios H and I are the most optimistic ones as to the effectiveness of the UK's social distancing policy.</p>
<p>In scenario I, it is assumed (for the sake of showing one extreme) that the virus is immediately unable to spread further and dies out within 2 weeks, as all persons currently infected either recover or die. New cases are still detected for the first 5 days in line with the default parameters in this version (3) of David's model under which it is assumed that it takes 5 days for symptoms to appear.&nbsp;&nbsp;</p>
<p>In scenario H, the virus spreads very slowly, and dies out by about mid June.</p>
<p>However, both of these scenarios already look extremely optimistic because the actual numbers of confirmed cases and deaths have already significantly exceeded their projections by the end of March.</p>
<p>Similarly the numbers of cases and deaths projected under scenarios E to G look implausible in comparison to the actual published numbers by 1 April.</p>
<p>But maybe we are in scenarios somewhere between A and E?&nbsp;&nbsp;</p>
<p></p>
<p>More importantly, what is it about the modelling that the UK government is relying on that is leading them to predict a peak of new cases (and probably daily deaths) many weeks earlier than the projections in David's model?&nbsp;</p>
<p>As David says, his model or calculations may well be wrong (and indeed he hopes it is wrong with regard to the high number of deaths projected, and would be delighted if someone can point out a mistake, or implausible assumption!).</p>
<p>I hope we (the collective human mind, pooling all our skills and experience together) ought to be able to examine the model relied on by the UK government in the same way: with exponential growth, two weeks can make the number of cases grow more than ten fold.</p>
<p>I understand that the source code may be being made available very soon by Professor Neil Ferguson.</p>]]></content:encoded></item><item><title>This site now updated to use ASP.Net Core 3.1</title><link>https://pjlee.net/blog/this-blog-now-updated-to-use-aspnet-core-31</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 02 Apr 2020 13:21:00 +0000</pubDate><guid>https://pjlee.net/blog/this-blog-now-updated-to-use-aspnet-core-31</guid><description>For those with a developer/techie interest, I have recently updated this site to use ASP.NET Core 3.1. ButterCMS is used as a headless CMS engine, and I have added Telerik Kendo UI for ASP.NET Core controls which I aim to use for some more data based future posts. An Azure ...</description><content:encoded><![CDATA[<p>For those with a developer/techie interest, I have recently updated this site to use ASP.NET Core 3.1. ButterCMS is used as a headless CMS engine, and I have added Telerik Kendo UI for ASP.NET Core controls which I aim to use for some more data based future posts. An Azure function keeps the tag cloud up to date nightly.</p>]]></content:encoded></item><item><title>Links to Covid19 Actuaries' Response Group Bulletins 4 to 6</title><link>https://pjlee.net/blog/covid19-actuaries-response-group-bulletins-4-to-6-available-here</link><media:content medium="image" url="https://cdn.buttercms.com/v2RzbqLJSfayyt70U68C" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 02 Apr 2020 11:48:00 +0000</pubDate><guid>https://pjlee.net/blog/covid19-actuaries-response-group-bulletins-4-to-6-available-here</guid><description>For those unable or unwilling to log in to Linked In, here are recent bulletins published by the group to in our collective battle to make sense of and overcome the Covid-19 pandemic: Covid-19 Actuaries Response Group Bulletin 4: UK is not like China! (30 Mar 2020) Covid-19 Actuaries Response ...</description><content:encoded><![CDATA[<p>(The screenshot above is from Bulletin 5 from the Group).</p>
<p>For those unable or unwilling to log in to Linked In, here are recent bulletins published by the group in our (the whole world's) collective battle to make sense of and overcome the Covid-19 pandemic:</p>
<p><a href="https://cdn.buttercms.com/hPlYXFnQluynYA05FBXZ" rel="follow">Covid-19 Actuaries Response Group Bulletin 4: UK is not like China! (30 Mar 2020).</a></p>
<p>This paper casts doubt on the conclusions of a paper from the Department of Electrical and Electronic Engineering of Imperial College suggesting that the total number of deaths from COVID-19 in the UK could be as low as 7100.</p>
<p><br /><a href="https://cdn.buttercms.com/Ls3KVXLnTHed92WYOY98" rel="follow">Covid-19 Actuaries Response Group Bulletin 5: Suppression v Mitigation (31 Mar 2020)</a><br />The summary from this paper is:&nbsp;</p>
<blockquote>
<p>Suppression strategies seek to reduce the spread of this epidemic by aggressive identification of infected individuals, with strict isolation of them. Innovative contact tracing and testing, has shown success in slowing the epidemic in countries like Singapore, China, Taiwan and South Korea. However, this leaves the population without immunity and susceptible to recurring outbreaks.<br />Mitigation strategies seek to manage spread of infection through a population by significantly reducing social interaction between and among population subgroups. Specific isolation measures are implemented for vulnerable subgroups expected to be most adversely affected by infection. Success depends on:<br />- getting timing + level of reduced social interaction right so health services are not overwhelmed,<br />- high levels of compliance with social distancing,<br />- successful identification and isolation of vulnerable subgroups, and<br />- acquisition of long term immunity by those who have been infected</p>
</blockquote>
<p></p>
<p><a href="https://cdn.buttercms.com/qVryHmgySwOKfLRrarj1" rel="follow">Covid-19 Actuaries Response Group Bulletin 6: Modelling and the Covid-19 Pandemic (1 Apr 2020)</a><br />This paper gives further background to that from Bulletin number 5 on the choice between mitigation and suppression strategies, and discusses some aspects of some models produced so far.</p>
<p>My comments:</p>
<ol>
<li>The numbers of deaths quoted in the Bulletin are the ones from the Imperial College Covid-19 Response Team's 16 March 2020 paper. As I have pointed out (see&nbsp;<a href="https://pjlee.net/blog/covid-19-some-observations-following-the-publication-of-the-imperial-college-response-teams-paper-of">https://pjlee.net/blog/covid-19-some-observations-following-the-publication-of-the-imperial-college-response-teams-paper-of</a>) the number at the top end of the range (510,00 deaths in the UK) understates, perhaps to avoid alarming the population, the true likely number of deaths, because (as the 16 March 2020 paper states, but doesn't change the numbers to allow for) that is on the unrealistic assumption that everyone who needs hospitalisation can get treated.&nbsp; In reality the likely number of deaths could be up to 5 times as many (2.5 million), since the Imperial College paper assumes a death rate of 0.9% even if 4.4% of cases are able to receive hospital treatment.</li>
<li>It would have been useful if the paper had included a reference to <a href="https://davidwilkieworks.wordpress.com/coronavirus-covid-19/" rel="follow">David Wilkie's model</a>, which meets the final exhortation in the paper ("encourages members to engage with international modelling community by sharing models, expertise and experience"). David's model is available for anyone to use.</li>
</ol>]]></content:encoded></item><item><title>David Wilkie Covid19 model: his new website has updates (including version 3)</title><link>https://pjlee.net/blog/david-wilkie-covid19-model-his-new-website-has-updates-including-version-3</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 30 Mar 2020 15:55:00 +0000</pubDate><guid>https://pjlee.net/blog/david-wilkie-covid19-model-his-new-website-has-updates-including-version-3</guid><description>David Wilkie now has his own website, where further updates on his model will be posted, including the latest: a version 3 which tries to allow for the effect of changes in social distancing policy, see here .</description><content:encoded><![CDATA[<p><span>David Wilkie now has his own website, where further updates on his model will be posted, including the latest: a version 3 which tries to allow for the effect of changes in social distancing policy, see <a href="https://davidwilkieworks.wordpress.com/coronavirus-covid-19/" rel="follow">here</a>.&nbsp;</span></p>]]></content:encoded></item><item><title>Web version of David Wilkie's Covid-19 model v 2.1</title><link>https://pjlee.net/blog/web-version-of-david-wilkies-covid-19-model-v-21</link><media:content medium="image" url="https://cdn.buttercms.com/ugd6ov7TDOM38fg5x5J0" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 30 Mar 2020 03:18:00 +0000</pubDate><guid>https://pjlee.net/blog/web-version-of-david-wilkies-covid-19-model-v-21</guid><description>For those who are not comfortable with downloading and manipulating Excel files, I have written a web version of version 2.1 of D avid Wilkie's model (the slightly earlier version than the 2.2 version published yesterday) for #Covid19. Click here to use the web model. It is not as flexible ...</description><content:encoded><![CDATA[<p><span>For those who are not comfortable with downloading and manipulating Excel files, I have written a web version of <a href="https://pjlee.net/blog/david-wilkies-a-daily-model-for-infections-such-as-covid-19-version-21" rel="follow">version 2.1 of D</a></span><span><a href="https://pjlee.net/blog/david-wilkies-a-daily-model-for-infections-such-as-covid-19-version-21" rel="follow">avid Wilkie's model</a> (the slightly earlier version than the 2.2 version published yesterday) for #Covid19.</span></p>
<p><span><strong>Click <a href="https://inqademos.azurewebsites.net/Home/Covid19WilkieModel" rel="follow">here</a> to use the web model</strong>. <strong>(NB It looks as if you might need to accept cookies on the site for the model to work.)</strong> It is not as flexible as the Excel files in that you can't change formulae (only the parameter values), but it is quick to use and to see charts of infections and deaths each day, and their cumulative totals over time.</span></p>
<h2><span>Setting the Parameters</span></h2>
<p><span>The screenshot below shows the default parameters:</span></p>
<p><span><img src="https://cdn.buttercms.com/ZvxJSJgURX65MlscHYzd" alt="ADWCovid19Model2.1Parameters.jpg" /></span></p>
<p><span>After clicking the Run button you can look at the Chart and Result tabs:</span></p>
<p><span><img src="https://cdn.buttercms.com/ugd6ov7TDOM38fg5x5J0" alt="ADWCovid19Model2.1Chart.jpg" /></span></p>
<p><span><img src="https://cdn.buttercms.com/EGPmSPoLSUiGUWAa6XoQ" alt="ADWCovid19Model2.1TabularResultsChart..." /></span></p>
<h2><span>Chart tab: showing and hiding different series</span></h2>
<p><span>By clicking on the name of a series in the legend, you can toggle between showing that series or not showing it. In this way you can look in detail at each of the series, even though they have different orders of magnitude:</span></p>
<p><span>Under the default parameters (which do not reflect social distancing) the eventual number of cases gets very high by mid June:</span></p>
<p><span><img src="https://cdn.buttercms.com/mZCIZHryRMytweiBTT3k" alt="CumulativeCasesFromADWCovid19ModelV2...." /></span></p>
<p><span></span>After clicking the Cumulative Cases and Cumulative Total Deaths series in the legend, the next screenshot shows the peaks in cases (and deaths) are projected to occur in late May in the absence of social distancing:</p>
<p><img src="https://cdn.buttercms.com/9F4RgqnQeS1X0E63P94E" alt="ProjectedNewCasesFromADWCovid19ModelV..." /></p>]]></content:encoded></item><item><title>Update to David Wilkie's Covid-19 model: version 2.2</title><link>https://pjlee.net/blog/update-to-david-wilkies-covid-19-model-version-22</link><media:content medium="image" url="https://cdn.buttercms.com/tsuAZ40T2dNyN1QKGQwA" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 29 Mar 2020 15:22:00 +0000</pubDate><guid>https://pjlee.net/blog/update-to-david-wilkies-covid-19-model-version-22</guid><description>Further to previous posts, here are files for an updated version (2.2) of David Wilkie's model for #Covid19: David writes: I am an actuary, quite familiar with epidemiological models, which can be used in income protection insurance (IPI), which many doctors/GPs will be familiar with. Using the IPI methodology I ...</description><content:encoded><![CDATA[<p>Further to <a href="https://pjlee.net/blog/david-wilkies-a-daily-model-for-infections-such-as-covid-19-version-21" rel="follow">this previous post</a>, here are files for an updated version (2.2) of David Wilkie's model for #Covid19:</p>
<p>David writes:</p>
<blockquote>
<p>I am an actuary, quite familiar with epidemiological models, which can be used in income protection insurance (IPI), which many doctors/GPs will be familiar with.&nbsp; Using the IPI methodology I have developed a simple, but realistic, model for Covid-19 which can be run by anyone familiar with using Excel and goes onto one worksheet.&nbsp; No lengthy complicated programmes. I attach the current release of files, which you can use or forward to anyone who wishes:</p>
<p>I am always adding:&nbsp;</p>
<p>&ldquo;This model may be of use to those who are comfortable using Excel and wish to play with projections for Covid-19.&nbsp; So they may not appeal to all.&nbsp; I am not making forecasts of what will happen. This is a tool that allows one to put in parameter values and see what projections come out.&nbsp; Don&rsquo;t be depressed by the results.&nbsp; Things may well turn out much better than some of these projections."</p>
<p>&nbsp;David Wilkie (contact email: david.wilkie@inqa.com)</p>
</blockquote>
<p>The files are (<span>you can also check each file for integrity - namely that it hasn't been modified via its MD5 checksum, see&nbsp;</span><span><a href="http://onlinemd5.com/" rel="follow">http://onlinemd5.com/</a>&nbsp;for example):</span></p>
<p><a href="https://cdn.buttercms.com/kCwgWf12T1yW4cVt18sY" rel="follow">Cv19DailyModel_V2.2.docx</a></p>
<p>(MD5 checksum:&nbsp;75BADBA2CD794EB796ED99D191135D37)</p>
<p><a href="https://cdn.buttercms.com/fjMkTUFMTgypYDkdwM1z" rel="follow">CV19DailyModelNotesOnUK_02.docx</a></p>
<p>(MD5 checksum: EF8A85D1626981BDFC59516D29276F8A)</p>
<p><a href="https://cdn.buttercms.com/qkMQSqXwSNOO9a07X818" rel="follow">Cv19DailyModel-V2.2.xlsx</a></p>
<p>(MD5 checksum:&nbsp;174E8B545B4C3D6C2B78A51A0CD0F766)</p>
<p><a href="https://cdn.buttercms.com/18yZ7ZMrToemAVgge1ls" rel="follow">Cv19DailyModel_UK_02.xlsx</a></p>
<p>(MD5 checksum:&nbsp;A69EDCD6D643EFEEB301DEAD60FBB37B)</p>
<p><a href="https://cdn.buttercms.com/cn7NZmJRaiOLXAfYg0Tc" rel="follow">COVID-19-ECDC-2020-03-26.xlsx</a></p>
<p>(MD5 checksum: 4AE04629467813487F02DF6D42B4B9EE)</p>]]></content:encoded></item><item><title>"What is a coronavirus?" Link to Bulletin 3 from the Covid-19 Actuaries Response Group</title><link>https://pjlee.net/blog/what-is-a-coronavirus-link-to-bulletin-3-from-the-covid-19-actuaries-response-group</link><media:content medium="image" url="https://cdn.buttercms.com/uUucq6WkTVCW0Bt2x5Ox" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 27 Mar 2020 21:21:00 +0000</pubDate><guid>https://pjlee.net/blog/what-is-a-coronavirus-link-to-bulletin-3-from-the-covid-19-actuaries-response-group</guid><description>For those unable to not wanting to log in to LinkedIn, Bulletin 3 from the Covid-19 Actuaries' Response Group can be downloaded from here .</description><content:encoded><![CDATA[<p><em>(The image above is Systemic and Respiratory Disorders Caused By Covid-19 (Rothan &amp; Byrareddy, 2020)</em></p>
<p>For those unable to or not wanting to log in to LinkedIn, Bulletin 3 from the Covid-19 Actuaries' Response Group can be downloaded from <a href="https://cdn.buttercms.com/hTF8CPNNSzONPLcTKLdj" rel="follow">here</a>.</p>]]></content:encoded></item><item><title>Has over half of the UK population already been exposed to Covid19? Link to the Covid-19 Actuaries Response Group's 2nd bulletin</title><link>https://pjlee.net/blog/has-over-half-of-the-uk-population-already-been-exposed-to-covid19-link-to-the-covid-19-actuaries-re</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 26 Mar 2020 11:17:00 +0000</pubDate><guid>https://pjlee.net/blog/has-over-half-of-the-uk-population-already-been-exposed-to-covid19-link-to-the-covid-19-actuaries-re</guid><description>For those who can't or don't want to login to Linked In to read this 2nd bulletin, entitled "Has over half of the UK population already been exposed to Covid19?", you can download it at the following link: https://cdn.buttercms.com/Jwr6tuX5T4lyG67ApjIU</description><content:encoded><![CDATA[<p>For those who can't or don't want to login to Linked In to read this 2nd bulletin, you can download it at the following link:</p>
<p><a href="https://cdn.buttercms.com/Jwr6tuX5T4lyG67ApjIU" rel="follow">Has over half of the UK population already been exposed to Covid-19?</a></p>
<p></p>]]></content:encoded></item><item><title>David Wilkie's "A daily model for infections such as Covid-19, Version 2.1"</title><link>https://pjlee.net/blog/david-wilkies-a-daily-model-for-infections-such-as-covid-19-version-21</link><media:content medium="image" url="https://cdn.buttercms.com/IXIuzoExSuuc4HLr3wV5" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 25 Mar 2020 14:35:00 +0000</pubDate><guid>https://pjlee.net/blog/david-wilkies-a-daily-model-for-infections-such-as-covid-19-version-21</guid><description>My (InQA Limited and before that Watson Wyatt) colleague Professor David Wilkie has produced an Excel model to help actuaries and any one else who is interested model the possible spread of #Covid-19, and has asked me to put the files here so that they are readily available without anyone ...</description><content:encoded><![CDATA[<p><em>(The screenshot above is from the Chart of new infections in file&nbsp;Cv19DailyModel-ADW01.xlsx)</em></p>
<p>My (InQA Limited and before that Watson Wyatt) colleague Professor David Wilkie has produced an Excel model to help actuaries and any one else who is interested model the possible spread of #Covid-19, and has asked me to put the files here so that they are readily available without anyone having to log in to Linked In or another platform. The model is in Excel so that the parameters can be readily altered.</p>
<h2>Model description</h2>
<p>David writes:</p>
<blockquote>
<p><em>I have produced a daily version in one Excel worksheet.&nbsp; I attach my description of the model (Cv19DailyModel_V2.1.docx), the accompanying basic Excel (Cv19DailyModel_V2.xlsx), my own trials on the UK data (Cv19DailyModel-ADW01.xlsx) and a file of data extracted from the European Centre for Disease Control (ECDC) website and processed into a tidy form (COVID19-Countries-2020-03-24.xlsx).&nbsp; Note that ECDC is a day different from the UK.&nbsp; The latest data in their file is dated 24 March, but published in the UK on 23 March, so is really perhaps cases and deaths noted on 22 March.</em></p>
<p><em>Make use of this if you wish, and pass it on to anyone that might be interested. My actuarial approach seems different from the epidemiologists, but I don&rsquo;t have the mathematics of their model available.&nbsp; It is easy to recalibrate for any other country.</em></p>
<p><em>David Wilkie</em></p>
<p><em>contact:&nbsp;<a href="mailto:david.wilkie@inqa.com">david.wilkie@inqa.com</a></em></p>
</blockquote>
<p>Please note the final paragraph of David's paper describing the model:</p>
<blockquote>
<p><em>I must emphasise that I am not making specific forecasts.&nbsp; I am providing a tool that allows others to try out the results of hypothetical changes in what seem to me to be a plausible set of initial assumptions.&nbsp; If I made it much more realistic by stratifying the population by age, the model would need a full programme, which would be much harder for people to play with.&nbsp; Those who are happy changing the Excel may modify it as they wish.&nbsp; Others may just try altering certain values.&nbsp; My only request is that you recognise the authorship, and do not try copywriting it yourself to prevent others using it.</em></p>
<p><em>Copyright A D Wilkie</em></p>
<p><em>24 March 2020</em></p>
</blockquote>
<h2>Model files</h2>
<p>The files (see David's note above for what each file does; you can also check each file for integrity - namely that it hasn't been modified via its MD5 checksum, see <span><a href="http://onlinemd5.com/">http://onlinemd5.com/</a>&nbsp;for example)</span>&nbsp;are:&nbsp;</p>
<p><a href="https://cdn.buttercms.com/2qfsGOUoRtyja6SzqBSA" rel="follow">Cv19DailyModel_V2.1.docx&nbsp;</a></p>
<p>(MD5checksum: 99836539D23ADF0B42DBB957815EB145)</p>
<p><a href="https://cdn.buttercms.com/3oL5pYC4TpaqaTvZ98EV" rel="follow"><span>Cv19DailyModel-V2.xlsx</span></a>&nbsp;(MD5 checksum:&nbsp;&nbsp;F912ABCCF9B8BB16D595220F0A965CB9)</p>
<p><span><a href="https://cdn.buttercms.com/BdoqgacQiuEJnHhbCCOX" rel="follow">Cv19DailyModel-ADW01.xlsx</a>&nbsp;(MD5 checksum: EC6F4275ADC157B18DA8FD89FA18A46F) and</span></p>
<p><a href="https://cdn.buttercms.com/TyJhLRtBQaOYCKwBO2l6" rel="follow">COVID19-Countries-2020-03-24.xlsx</a>&nbsp;(MD5 checksum:&nbsp;905F671BEB769D8F2A0D24C63D16256A)</p>]]></content:encoded></item><item><title>Link to the Covid-19 Actuaries Response Group's paper of 24 March 2020</title><link>https://pjlee.net/blog/link-to-the-covid-19-actuaries-response-groups-paper-of-24-march-2020</link><media:content medium="image" url="https://cdn.buttercms.com/Sgd6CpNPRZCGuCtZlyxW" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 24 Mar 2020 20:21:00 +0000</pubDate><guid>https://pjlee.net/blog/link-to-the-covid-19-actuaries-response-groups-paper-of-24-march-2020</guid><description>Some people have asked to be able to read the Covid-19 Actuaries Response Group's paper of 24 March 2020, written in response to the Imperial College Covid-19 Response Team's paper of 16 March, which is otherwise only accessible via logging in to LinkedIn. A copy may be downloaded from Download ...</description><content:encoded><![CDATA[<p><em>(The image above is&nbsp;Figure 4 from the Imperial College Covid-19 Response Team's paper of 16 Mar 2020, showing the alternating lockdown / partial relaxation periods the UK - and probably the rest of the world - faces until a vaccine is found for #Covid19).</em></p>
<p>Some people have asked to be able to read the <a href="https://www.linkedin.com/company/covid-19-actuaries-response-group/" rel="follow">Covid-19 Actuaries Response Group</a>'s paper of 24 March 2020, written in response to the Imperial College Covid-19 Response Team's paper of 16 March (see <a href="https://pjlee.net/blog/covid-19-some-observations-following-the-publication-of-the-imperial-college-response-teams-paper-of" rel="follow">previous post</a>), which is otherwise only accessible via logging in to LinkedIn.</p>
<p>A copy of the Actuaries Response Group's paper of 24 March may be downloaded from <a href="https://cdn.buttercms.com/zgL5gYTlQUaYE6PuL8T4">Download ActuariesCovid19SupportGroupPaper24Ma...</a>. (I stress that I am not a member of this group, I merely follow it and have commented on it).</p>
<p></p>]]></content:encoded></item><item><title>COVID-19: some observations and queries following the publication of the Imperial College Response Team's paper of 16 March 2020</title><link>https://pjlee.net/blog/covid-19-some-observations-following-the-publication-of-the-imperial-college-response-teams-paper-of</link><media:content medium="image" url="https://cdn.buttercms.com/wPH4E1HIRsWaLdh794GP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 19 Mar 2020 00:29:00 +0000</pubDate><guid>https://pjlee.net/blog/covid-19-some-observations-following-the-publication-of-the-imperial-college-response-teams-paper-of</guid><description>(Like all my posts on this blog, these are my personal observations, made in a personal capacity and not representative of any employer or organisation I am associated with.) The UK government has stated that they are taking decisions based on scientific and medical advice. In particular, recent decisions have ...</description><content:encoded><![CDATA[<p><em>(Like all my posts on this blog, these are my personal observations, made in a personal capacity and not representative of any employer or organisation I am associated with.)</em></p>
<p>The UK government has stated that they are taking decisions based on scientific and medical advice. In particular, recent decisions have taken into account the paper published by the Imperial College Covid-19 Response Team on 16 March 2020 (see&nbsp;<a href="https://www.imperial.ac.uk/media/imperial-college/medicine/sph/ide/gida-fellowships/Imperial-College-COVID19-NPI-modelling-16-03-2020.pdf">https://www.imperial.ac.uk/media/imperial-college/medicine/sph/ide/gida-fellowships/Imperial-College-COVID19-NPI-modelling-16-03-2020.pdf</a>).</p>
<p>The publication of that paper is a very welcome and considerable improvement in transparency which in my opinion is a very important part in:</p>
<ol>
<li>The UK public (and people and governments of other countries since this is a global pandemic) maintaining confidence in the government's response to the Covid-19 crisis.&nbsp;</li>
<li>&nbsp;Equally importantly, enabling a truly scientific approach to work: without being exposed to scrutiny and criticism by as wide an audience as possible, flaws in the decision process are far less likely to be found.</li>
</ol>
<p>(We are not at war with an intelligent enemy intent on reacting to our strategy, hence there should be no need for secrecy.&nbsp; If any secrecy were to be involved, then the approach taken would no longer be scientific.)</p>
<p>I have now had time to read through the paper a couple of times and make some observations here and pose a few questions that jumped out at me.</p>
<p><em>(Note that the paper also contains modelling projections and similar conclusions for the USA, but here I focus on the implications for the UK).</em></p>
<h1><strong>Caveats</strong></h1>
<p>I am not trained in medicine or epidemiology.&nbsp; My qualifications are in mathematics (a degree), statistics (a diploma in mathematical statistics), actuarial science(I am a Fellow of the Institute of Actuaries), and I also hold Microsoft Professional Program certificates in Data Science, Big Data and Artificial Intelligence.&nbsp;&nbsp;</p>
<p>In any case, a true scientific approach means that anyone, no matter how qualified or unqualified they are, whether adult or child (or in an AI world, a robot or program!) is free to challenge any assertion, no matter how eminent the group that makes that assertion is.The scientific community and everyone else can then see whether the response to a challenge appears sound or not. If not, then the assertion must be corrected, refined, or dismissed.&nbsp;</p>
<p>You are completely free therefore to discount or listen to what I say as you wish. But I hope this post will be of some interest to those with an interest in trying to understand what (to me, as someone new to the paper, and from my interpretation of it) may be driving current government thinking.</p>
<h1>Key observations so far from the paper</h1>
<p>The most important points that I take from the paper are:</p>
<h2><strong>Assumed death rate</strong></h2>
<ul>
<li>The model assumes an average death rate of 0.9% for those infected in the UK by Covid-19 (Infection Fatality Rate, see page 5 of the paper). It is an average rate, so will be lower for some (e.g. younger people) and higher for others (e.g. older people or those with significant existing medical conditions)</li>
<li>It assumes that on average 4.4% of infected people will need hospitalisation, and of these 30% (so 1.32% of infected persons) will require critical care. It assumes that on average about half of the latter will die, despite receiving ICU (Intensive Care Unit) treatment. (Again see page 5). Note that this also means that&nbsp;3.08% of infected persons are assumed to need non critical hospital care.&nbsp;</li>
<li>This isn't stated in the paper (perhaps it should be?), but if we make the assumption that deaths only occur from those who require hospitalisation (which I think should be correct to first order), in order to arrive at the overall death rate of 0.9%, given that we know that half of the 1.32% critical care cases are assumed to die (so 0.66%), it follows that 0.9 - 0.66 = 0.24% out of the 3.08% of non critical care hospitalisations (so about 1 in 13) are assumed to die. The converse is that treatment of critical cases saves 0.66% of those infected, and treatment of non critical cases saves 3.08 - 0.24 = 2.84% of infected cases.</li>
<li>An important question is what would happen to new infected cases if the NHS was overwhelmed and unable to treat any further COVID-19 patients. From the above, the death rate would go up from 0.9% by 0.66 (from critical cases no longer being able to be saved) + (some but not all of 2.84 non critical cases no longer able to be saved). So the death rate would rise from 0.9% to somewhere between 1.56% and 4.4% of infected cases, depending on how many non critical cases can survive without hospitalisation.</li>
</ul>
<p><strong>On this basis, the death rate of new infected persons is likely to almost double, and perhaps rise almost five fold if the NHS capacity is breached</strong>.</p>
<p>Without intervention, the paper predicts peak infections in about 3 months time (so around mid June) and gives a projected 510,000 deaths.</p>
<p>Given the UK population of about 66 million, that would imply a death rate of 510,000 / 66,000,000 = 0.77% assuming 100% of the population becomes infected, or 0.96% if (as mentioned elsewhere in the paper) only about 80% of the population becomes infected.</p>
<p>Both of these rates are much closer to the 0.9% average rate the paper assumes allowing for treatment, than the 1.56% to 4.4% range that would seem to apply if the NHS were to be overwhelmed.</p>
<p>In fact the paper says on page 7 (the bold emphasis is mine):</p>
<blockquote>
<p>we would predict approximately 510,000 deaths in GB and 2.2 million in the&nbsp;US, <strong>not accounting for the potential negative effects of health systems being overwhelmed on mortality</strong>.&nbsp;</p>
</blockquote>
<p>Given that the paper also states (lower down on page 7) that without intervention the NHS ICU bed capacity would be overwhelmed by the second week in April, the actual number of deaths would be projected (on the model's own assumptions <strong>after allowing for no NHS treatment being possible</strong>) to be between 884,000 and just under 2.5 million.&nbsp;</p>
<h2><strong>Hence do nothing is not an option</strong></h2>
<p>Understandably given the above (since even 510,000 deaths would represent a doubling of the typical yearly number of deaths - from old age, sickness, motor and other accidents etc - in the UK from a population of some 66 million), the modelling team and the government have concluded that doing nothing is not an option.</p>
<p>They therefore look at two broad types of strategies:&nbsp;</p>
<ul>
<li>mitigation, under which the epidemic is allowed to continue to spread, but at a lower rate and not amongst the most vulnerable (older people and those with significant existing medical conditions), and</li>
<li>suppression, under which the goal is try and stop the virus spreading, until such time as a vaccine or effective treatment can be found.</li>
</ul>
<h2>Mitigation strategy</h2>
<p><strong><img src="https://cdn.buttercms.com/szBlOSimTOmC8fVDxoFt" alt="ImperialCollegeCovid19ResponseGroupFi..." /></strong></p>
<p><strong>(The image above is from figure 2 on page 8 of the paper)</strong></p>
<p><strong></strong>The paper states that under the model used, the best practical mitigation strategy that they have been able to suggest (see page 6) is a mixture of case isolation (infected persons or persons with symptoms self isolate for 7 days), home quarantine (for people in the same household as someone with symptoms, for 14 days) and social distancing for those aged over 70 (to protect them from becoming infected). This is the blue (lowest) curve in figure 2 on page 8 of the paper (see screenshot above). The red line is the NHS critical care bed capacity, above which further patients with critical needs can't be treated.</p>
<p>But even under that strategy, although it "reduces peak critical care demand by two-thirds and halves the number of deaths", it would still result in an 8-fold higher peak demand on critical care beds than the NHS has capacity for. Page 16 states (again the bold emphasis is mine):</p>
<blockquote>
<p><strong>even if all patients were able to be treated</strong>, we&nbsp;predict there would still be in the order of 250,000 deaths in GB.</p>
</blockquote>
<p>Note that In the same way that the 510,000 deaths quoted under the "Do nothing" policy is a significant underestimate (because of the much higher mortality rate that applies once the NHS is overwhelmed), the figure of 250,000 also looks to be much lower than it would be in practice.</p>
<p>Not surprisingly, the group and the government have concluded that mitigation is no longer an option:</p>
<p><strong>effectively all COVID-19 cases in figure 2 above the red line become subject to an assumed mortality rate of about 1.5% to 4.4% rather than 0.9%.</strong></p>
<p></p>
<p>Hence the move since the publication of the paper to a suppression strategy (see page 16):&nbsp;</p>
<blockquote>
<p>We therefore conclude that epidemic suppression is the only viable strategy at the current time.</p>
</blockquote>
<h2>Suppression strategy</h2>
<p>Here the goal is to keep the number of infections below the level at which the NHS is overwhelmed. This wasn't possible with mitigation, so the strategy is to stop the infection spreading by severely reducing social contact.</p>
<p>However, the social and economic costs of doing this are considerable (so this is not sustainable beyond a few months), and given that Covid-19 is a global pandemic, the epidemic is very likely to flare up again very soon after restrictions on social contact are released.&nbsp;</p>
<p>This strategy therefore involves a succession of alternate periods of isolation for the population as a whole, followed by temporary relaxations, with such iterations continuing until either a vaccine has been found, or an effective treatment, or massively increased health service capacity.</p>
<p>The paper states that under the model used, the best practical suppression strategy that they have been able to suggest (see page 11) is:</p>
<p style="margin: 0in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;">Combining all four interventions (social distancing of the entire population, case isolation, household quarantine and school and university closure) is predicted to have the largest impact, short of a complete lockdown which additionally prevents people going to work.</p>
<p><img src="https://cdn.buttercms.com/ReSO1a8TH2v6Pyc7IfdQ" alt="ImperialCollegeCovid19ResponseGroupFi..." /></p>
<p><strong>(The screenshot above is from figure 3 on page 10 of the paper.)&nbsp;</strong></p>
<p>The strategy proposed by the group (and it seems adopted for the time being by the government) is shown as the green line.&nbsp;</p>
<p>Note that it assumes that the current restrictive measures remain in place for about 5 months, and are likely to prevent the disaster scenario of the NHS capacity being overwhelmed, thus keeping the mortality rate at the assumed lower level of 0.9%.</p>
<p>It then assumes that <strong>some</strong> of the restrictions are temporarily relaxed in about September of this year (with schools and universities reopening and social distancing relaxed), before being reimposed again after what looks like 3 to 4 weeks (before the green line starts rising steeply towards the NHS capacity red line.</p>
<h2>We face 12 to 24 months of facing very significant social restrictions for about 2/3 of the time</h2>
<p>This approach is shown in the screenshot below of figure 4 from page 12 of the paper:</p>
<p><img src="https://cdn.buttercms.com/Sgd6CpNPRZCGuCtZlyxW" alt="ImperialCollegeCovid19ResponseGroupFi..." /></p>
<p>What this chart implies is that, until either:</p>
<ul>
<li>an effective vaccine is found, and sufficient stocks of it become available, or</li>
<li>health service capacity is very significantly increased, or&nbsp;</li>
<li>an effective method of home treatment (not requiring skilled medical equipment or staff) is found, or</li>
<li>a suitable combination of the above</li>
</ul>
<p>we in the UK (and probably those in other countries too) face many months (<strong>not just the next 5, but probably a year or two</strong>) of alternating restrictions and <strong>partial</strong> relaxations (with social distancing relaxed, and schools/universities reopening), with full restrictions operating an estimated 2/3 of the time.&nbsp;&nbsp;</p>
<p>The changes to our way of life (and to our economy) are likely to be profound.&nbsp; But the alternative looks very stark: infected patients facing average death rates of somewhere between 1.5% to 4.4% (the 0.9% that we face even if the health service capacity were a thousand fold bigger is bad enough) and doctors and nurses facing agonising decisions as to who to treat.</p>
<h2>Some (possibly significant) queries</h2>
<p>The above are the conclusions that I draw from reading the paper. I may be mistaken, and in any case corrections or comments are welcome.</p>
<p>I do have some queries. Some are very minor so if I post them at all it will be in a follow up post.</p>
<p>But two queries might have a significant impact on the severity of the regime that it looks we (the human population) face from the group's analysis (for which I believe they are owed many thanks given the considerable work involved, and its importance):</p>
<h3>Can the restrictions be relaxed more often than just a 1/3 of the time?</h3>
<p></p>
<p><img src="https://cdn.buttercms.com/wPH4E1HIRsWaLdh794GP" alt="ImperialCollegeCovid19ResponseGroupFi..." /></p>
<p>In figure 4, the peaks are projected to be much lower after the first one.&nbsp; ICU (Intensive Care Unit) surge capacity is stated (page 13 of the report) to be approximately 5,000 beds.&nbsp;&nbsp;</p>
<p>Couldn't we switch to a higher trigger level for reimposing restrictions (such that the peaks are around 1,000 or even 2,000 ICU beds rather than the 400 shown in figure 4)?&nbsp;</p>
<p>This would demand a lower proportion of time in suppression mode than the 2/3 projected in figure 4.</p>
<p></p>
<h3>To what extent might the assumed mortality rate be significantly overstated due to not counting infected cases with little or no symptoms?</h3>
<p>.One of the paper's key assumptions is the Infection Fatality Rate (the death rate for infected patients) of 0.9%.&nbsp; That is stated (on page 5) to have been arrived at from an analysis of known deaths out of total known cases in China, and adjusted for the UK's age distribution.</p>
<p>But the UK's Chief Medical Officer has stated that the government's best estimate of the true current number of cases (including patients who are unaware that they have COVID-19, because they haven't been tested) is around 40,000 to 50,000, as compared with the most recent number of confirmed cases so far (2,626 as at 0900 on 18 March 2020).&nbsp;</p>
<p>Of course it is not clear whether "40 to 50 thousand" means currently active cases, or the total number infected so far, which would be comparable with the 2626 known cases.</p>
<p>But it does seem possible that if we (or the Chinese) could test everyone, we might find that the number of current cases is actually 10 times higher than the current number of confirmed cases. In which case the correct average mortality rate to assume might not be 0.9% but 0.09%.</p>
<p>Because of exponential growth in the number of infections, NHS capacity would still be breached without suppression, but instead of the post breach death rates being somewhere between 1.5% and 4.4%, they would be between 0.15% and 0.44%, leading to extra deaths compared to a normal year of the order of 100,000 to 290,000 - still bad, but better than the current 600,000 we face the prospect of, even under the suppression policy (given that the government has said that most of us are likely to be infected at some point), on the assumption of a death rate of 0.9%.&nbsp;</p>]]></content:encoded></item><item><title>My Journey to Data Science, Big Data and AI</title><link>https://pjlee.net/blog/my-journey-to-data-science-big-data-and-ai</link><media:content medium="image" url="https://cdn.buttercms.com/HDFta5FoSpmczrDjPw9K" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 11 Mar 2020 16:22:00 +0000</pubDate><guid>https://pjlee.net/blog/my-journey-to-data-science-big-data-and-ai</guid><description>I gave a presentation to the Channel Islands Actuarial Association earlier today, and a similar one earlier this year to the Staple Inn Actuarial Society. I provided copies of the materials I used to those two Societies, but I have had a few requests for a copy from other people: ...</description><content:encoded><![CDATA[<p><em>(The screenshot above the article is of Azure Data Factory which is used to orchestrate and automate Big Data processes).</em></p>
<p>I gave a presentation to the <a href="https://www.actuaries.org.uk/get-involved/regional-activity/united-kingdom/channel-islands-actuarial-association" rel="follow">Channel Islands Actuarial Association</a> earlier today, and a similar one in January to the <a href="https://sias.org.uk/" rel="follow">Staple Inn Actuarial Society</a>.</p>
<p>I provided copies of the materials I used to those two Societies, but I have had a few requests for a copy from other people too so:</p>
<p>You can find a copy of the slides I used earlier today <a href="https://cdn.buttercms.com/eio1GKk2QHK48GK9Znws" rel="follow">here</a>. (I have tried to make the slides reasonably self-documenting but if you want further information, please get in touch).&nbsp;</p>
<p><span>My talk was about my experience of taking over 30 MOOCs (Massively Open Online Courses), the differences as I see them between data science, big data and AI and the courses which I found most interesting from an actuarial point of view. I also talked on the ethical uses &amp; challenges of AI.</span></p>
<p></p>]]></content:encoded></item><item><title>Set up a custom Azure dashboard and alerts to monitor the health of your queues</title><link>https://pjlee.net/blog/set-up-a-custom-azure-dashboard-and-alerts-to-monitor-the-health-of-your-queues</link><media:content medium="image" url="https://cdn.buttercms.com/oYBbKd1lTt6qWAHcPDSe" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 29 Sep 2019 14:59:00 +0000</pubDate><guid>https://pjlee.net/blog/set-up-a-custom-azure-dashboard-and-alerts-to-monitor-the-health-of-your-queues</guid><description>Set up a custom dashboard showing the length of your queues One of the common use cases for an Azure function is to run on a timer to check the status of one or more Azure queues. You can do this very easily via an Azure v2 function because these ...</description><content:encoded><![CDATA[<h1>Set up a custom dashboard showing the length of your queues&nbsp;</h1>
<p>One of the common use cases for an Azure function is to run on a timer to check the status of one or more Azure queues.</p>
<p>You can do this very easily via an Azure v2 function because these integrate very easily with their associated Applications Insights resource. (If you create the function via the Azure portal, you can choose - and I recommend - to create an associated Applications Insights resource at the same time.&nbsp; Otherwise you can add such a resource after creating the function.)</p>
<p>It turns out (although this is not immediately clear from the documentation) that you don't have to do anything to connect your function to its Application Insights resource: if you want to add a custom metric (e.g. the length of a particular queue), all you have to do is call LogMetric on the logger than is passed to the function.</p>
<p>For example, for a queue called queueName whose approximate length is queueLength, simply call:</p>
<p><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">log.LogMetric(</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">$"Queue length - {</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">queueName</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">}"</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">, (</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">double</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif;">)queueLength);</span></p>
<p></p>
<p>So with very little code you can track and monitor the approximate length of your Azure queues over time via creating charts of these custom metrics and even add them to a custom Azure dashboard that you can check periodically to try and find out:</p>
<ul>
<li>a) what your normal patterns of queue usage are</li>
<li>b) spot unusual patterns which could be an early warning sign of problems or extra resources being needed.</li>
</ul>
<h1>Set up automated alerts if your queues grow bigger than expected</h1>
<p>And you can even set up alerts to send yourself and key colleagues an email if a queue (including a poison queue) has an unexpectedly high number of messages.</p>
<p>To do this: in the Portal, via Monitor, Alerts, New alert rule, then choose the ApplicationInsights cadsqueuemonitorfuncapp1 resource.</p>
<p>In Configure signal logic, choose Metrics as the signal type and AzureApplicationInsights as the service to be monitored, and then you can choose any of the custom metrics (i.e. the length of a particular queue), and add an alert to e.g. send an email to a group of addresses if the queue length exceeds a specified number.</p>
<h1>Conclusion</h1>
<p>This is a great feature of Azure Functions version 2, and combined with custom metrics in Application Insights, custom dashboards and Alerts can make monitoring your Azure queues much easier!</p>
<p></p>]]></content:encoded></item><item><title>.NET Core 3.0 now available!</title><link>https://pjlee.net/blog/net-core-30-now-available</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sun, 29 Sep 2019 14:52:00 +0000</pubDate><guid>https://pjlee.net/blog/net-core-30-now-available</guid><description>Further to this article, Microsoft released .NET Core 3.0 on 23 September.</description><content:encoded><![CDATA[<p>Further to <a href="https://pjlee.net/blog/net-core-30-release-is-planned-for-september-2019">this article</a>, Microsoft released .NET Core 3.0 on 23 September (see the Dot NET Core<a href="https://github.com/dotnet/core/blob/master/roadmap.md"> Roadmap</a>).</p>]]></content:encoded></item><item><title>How to use OneNote to organise notes much better than in e.g. Word</title><link>https://pjlee.net/blog/how-to-use-onenote-to-organise-notes-much-better-than-in-eg-word</link><media:content medium="image" url="https://cdn.buttercms.com/Z1iN6xxQ4ugsYiahvbdx" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 04 Sep 2019 23:21:00 +0000</pubDate><guid>https://pjlee.net/blog/how-to-use-onenote-to-organise-notes-much-better-than-in-eg-word</guid><description>Many years ago I switched to using OneNote (part of Microsoft Office) for taking notes, as opposed to Word. After all, that is what OneNote is designed for, whereas Word is designed to be a general word processing tool. If you put your notes in Word, you have to use ...</description><content:encoded><![CDATA[<p>Many years ago I switched to using OneNote (part of Microsoft Office) for taking notes, as opposed to Word.</p>
<p>After all, that is what OneNote is designed for, whereas Word is designed to be a general word processing tool!</p>
<p>If you put your notes in Word, you have to use Windows File Explorer to find them, and organise them, and when you are searching for notes (and content within notes), you have to keep switching between File Explorer and Word.</p>
<p><strong>I have found OneNote much easier both to organise and to find content within notes.</strong>&nbsp; OneNote has an excellent search facility, and you can stay within OneNote to find any of your notes.</p>
<h1>OneNote's hierarchy: Notebooks, Section Groups, Sections and Pages</h1>
<p>For very different items, you can use different <strong>Notebooks</strong> (e.g. Personal and Work).</p>
<p>Within a notebook, you can organise notes within different<strong> Section Groups</strong>, each of which has different <strong>Sections</strong>, each of which has different <strong>Pages</strong>.</p>
<p>For example a student revising for exams could have different Section Groups for each subject (e.g. Magical Creatures, Divination, Alchemy), and use different Sections for each major topic within a particular subject (e.g. Gold, Silver within Alchemy).</p>
<p><em>The instructions and screenshots below are for OneNote for Windows 10 (which is now actually just called OneNote).&nbsp; The previous version of OneNote was OneNote 2016, which Microsoft are replacing with OneNote for Windows 10.&nbsp; The steps for OneNote 2016 would follow very similar principles however.</em><em></em></p>
<h1>Example of a well structured OneNote notebook for revision</h1>
<p><img src="https://cdn.buttercms.com/kWKO3rKBSd2PLepCT4iu" alt="OrganisingOneNoteForWindows10UsingSec..." /></p>
<p>How can you achieve this sort of structure within OneNote? By making use of the hierarchy of items within OneNote as follows.</p>
<h1>How to create a new Section Group</h1>
<p>In the bottom left of OneNote, you should see + Add section. Right click this and click on New Section Group:</p>
<p><img src="https://cdn.buttercms.com/xPFUMLfR9yRMUwoiL2hV" alt="AddingANewSectionGroup.jpg" /></p>
<p>Note: You can rename most items (Section Group, Section, or Page by right clicking them and Rename should be one of the options).&nbsp; &nbsp;Here is an example of naming or renaming a Page:</p>
<h1><img src="https://cdn.buttercms.com/zuqvBhRTQ9aAORmtxfnJ" alt="NamingOrRenamingAPage.jpg" style="font-size: 14px; font-family: Lato, Helvetica, Arial, sans-serif;" /></h1>
<p>So once you have created your new Section Group, give it an appropriate name.</p>
<h1>How to create a new Section within a Section Group</h1>
<p>Right click the section group in the left navigation pane and click on New Section, and there is a&nbsp; Create New Tag option (or you can select existing tags):</p>
<h1><img src="https://cdn.buttercms.com/UtH6tCJTqSANT7ICDFPA" alt="AddingANewSectionToASectionGroup.jpg" /></h1>
<p>Give your new Section an appropriate name.</p>
<h1>How to create a new Page within a Section</h1>
<p>Select (left click) the section in the left navigation pane and click on the Add Page link below and to the right:</p>
<h1><img src="https://cdn.buttercms.com/rR4sMBnQNeSLseoeEOAH" alt="AddingANewPageToASection.jpg" /></h1>
<p>Give your new Page an appropriate name.</p>
<p></p>
<p>Once you have organised your notes in this way, how can you find them, and read them?&nbsp; The left toolbar is very useful for this:</p>
<h1>OneNote's left toolbar</h1>
<p>This has items to Show/Hide Navigation, Search, and Recent Notes:</p>
<p><img src="https://cdn.buttercms.com/E01DZEuqRQOkmzQlBPxr" alt="undefined" /></p>
<p>If you want to reorder sections, you can drag and drop within the Navigation Links. You can also right click sections or pages and there is a link to move or copy them.&nbsp;</p>
<p>You can use the search icon (magnifying glass) to search by content, and also by any tags you have marked any of your pages with.</p>
<h1>To add a tag</h1>
<p>Click on the dropdown arrow to the right of the tags link (a ticked box) in the toolbar:</p>
<p><img src="https://cdn.buttercms.com/GWmlL2VQWi2bwVmqQhF8" alt="undefined" /></p>
<p>I hope you find this post useful and that, like me, OneNote enables you to do your work and studying more effectively.&nbsp;</p>
<p></p>]]></content:encoded></item><item><title>.NET Core 3.0 release is planned for September 2019!</title><link>https://pjlee.net/blog/net-core-30-release-is-planned-for-september-2019</link><media:content medium="image" url="https://cdn.buttercms.com/iinSAlYTTmPW6TXqMdBg" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 05 Jul 2019 08:19:00 +0000</pubDate><guid>https://pjlee.net/blog/net-core-30-release-is-planned-for-september-2019</guid><description>Further to my previous post about Blazor see here ) I am excited about the forthcoming release of version 3.0 of .NET Core by Microsoft, expected in September 2019. In particular, not only will this version include Blazor, but it will include support for machine learning. https://msdn.microsoft.com/en-us/magazine/mt848631.aspx says: NET Core ...</description><content:encoded><![CDATA[<p>Further to my previous post about Blazor (see <a href="https://pjlee.net/blog/an-experiment-setting-up-a-blazor-website-with-telerik-ui-components-a-blog-via-buttercms-and-commen">here</a>) I am excited about the forthcoming release of version 3.0 of .NET Core by Microsoft, expected in September 2019.&nbsp;&nbsp;</p>
<p>In particular, not only will this version include Blazor, but it will include support for machine learning.&nbsp;&nbsp;<a href="https://msdn.microsoft.com/en-us/magazine/mt848631.aspx">https://msdn.microsoft.com/en-us/magazine/mt848631.aspx</a>&nbsp;says:</p>
<blockquote>
<p><span>NET Core 3.0 will also fully support ML.NET, our open source machine learning framework built for .NET developers. ML.NET powers products like Azure Machine Learning, Windows Defender and PowerPoint Design Ideas. Using ML.NET you can add many popular machine learning scenarios to your apps like sentiment analysis, recommendations, forecasting, image classification and more. Learn more at&nbsp;</span><a href="http://bit.ly/2OLRGRQ">bit.ly/2OLRGRQ</a><span>.</span></p>
</blockquote>
<p><span></span></p>]]></content:encoded></item><item><title>I just completed Microsoft's Reinforcement Learning Explained course</title><link>https://pjlee.net/blog/i-just-completed-microsofts-reinforcement-learning-explained-course</link><media:content medium="image" url="https://cdn.buttercms.com/xnmzYKyQWeexEaVu2Sux" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 01 Jul 2019 13:18:00 +0000</pubDate><guid>https://pjlee.net/blog/i-just-completed-microsofts-reinforcement-learning-explained-course</guid><description>Yesterday I completed what I have found to be the most demanding course so far on the Microsoft Professional Program for Artificial Intelligence , Reinforcement Learning Explained . It took me 66.5 hours (more than twice as long as previous edX courses have taken me) and my final mark was ...</description><content:encoded><![CDATA[<p>Yesterday I completed what I have found to be the most demanding course so far on the <a href="https://academy.microsoft.com/en-us/tracks/artificial-intelligence">Microsoft Professional Program for Artificial Intelligence</a>, <a href="https://www.edx.org/course/reinforcement-learning-explained-10">Reinforcement Learning Explained</a>. It took me 66.5 hours (more than twice as long as previous edX courses have taken me) and my final mark was 94%.&nbsp;&nbsp;</p>
<p>This was my 9th course on the professional program, and this month (July 2019) I am taking the final course, a capstone project designed to test a lot of the material learned during the previous courses.&nbsp; I have had a quick look at this (I couldn't until now because the capstone courses can only be taken in the first month of every calendar quarter), and it is an interesting project: developing an algorithm to successfully classify sound files as to whether the accent used is Canadian, English or Indian! So I am looking forward to doing that.</p>
<p>Once I have finished the AI professional program, I will write up an overview of it (as I did <a href="https://pjlee.net/blog/microsoft-professional-program-for-data-science-my-journey-may-2017-april-2018">here</a> with the Data Science and <a href="https://pjlee.net/blog/microsoft-professional-program-for-big-data-my-journey-oct-2017-apr-2019">here</a> with the Big Data professional programs), but here are some brief comments about the Reinforcement Learning Explained course.</p>
<p><span>Arguably this is the most actuarial/mathematical of all the courses I have done so far, whether on data science, big data or AI. It involves optimisation in a stochastic process, and includes dynamic programming and the Bellman equations, which I remember doing at university a few decades ago. Quite a lot of python programming too.</span></p>
<p><span>Reinforcement Learning includes algorithms similar to the ones used by <a href="https://en.wikipedia.org/wiki/AlphaGo_Zero">Alpha Go Zero</a> (the program that managed to beat Alpha Go, the program that had beaten the human world champion at Go).&nbsp; Alpha Go taught itself initially by studying many previous games played by humans. Alpha Go Zero was entirely self taught: i.e. all it started off with was the rules of Go, and it learned by playing itself and gradually improving!</span></p>
<p><span>The image at the top of this article is of a much simpler problem than Go, a Simple Room Environment in which the objective is for an agent (think of this as a player in a game) to learn how to reach the bottom right square as quickly as possible starting from the top left square.&nbsp; There are walls in place which block certain routes. The agent is represented by the yellow square.</span></p>
<p><span>The image shows the progress of an agent using a <a href="https://en.wikipedia.org/wiki/State%E2%80%93action%E2%80%93reward%E2%80%93state%E2%80%93action">SARSA</a> (State Action Reward State Action) algorithm as it learns during 12 stochastic episodes (plays of the game).&nbsp; The game stops after 50 moves or if the goal (the bottom right cell) is reached before then.&nbsp; The Length in the charts is the number of moves (with 50 normally denoting failure to reach the goal), and the Reward is the total reward received during the episode (a score of 1 means that the goal was reached).&nbsp; </span></p>
<p><span>You can see from the charts that towards the end of the 12 episodes, the agent seems to have learnt to reach the goal consistently (i.e. it will no longer fail).&nbsp; This is not necessarily going to be the case however, nor would this necessarily be optimal: the agent may have found a lengthy route to reach the goal, so often in Reinforcement Learning problems, it is necessary to continue <strong>exploring</strong> from time to time (e.g. under an epsilon greedy process, see <a href="https://en.wikipedia.org/wiki/Multi-armed_bandit">https://en.wikipedia.org/wiki/Multi-armed_bandit</a>) in the hope of finding an even better route.</span></p>
<p><em>PS I have complained to edX about the course having been advertised as only taking 24 to 36 weeks yet containing a lot more material and lab work than previous courses. And about other problems too: very poor English in the material and questions, very poor pronunciation in some of the course videos (and hence the video transcripts, which clearly were never checked by edX), no responses from edX to discussion forum posts after 2 months! I hope edX will sort some or all of these problems out in future versions of the course, but be forewarned that it may take considerably longer than other courses in case they have not.</em><span></span></p>]]></content:encoded></item><item><title>June 2019: I've been re-elected to IFoA Council - thank you!</title><link>https://pjlee.net/blog/june-2019-ive-been-re-elected-to-ifoa-council-thank-you</link><media:content medium="image" url="https://cdn.buttercms.com/rSjSnXytT6u3U3zI6KBW" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 28 Jun 2019 10:29:00 +0000</pubDate><guid>https://pjlee.net/blog/june-2019-ive-been-re-elected-to-ifoa-council-thank-you</guid><description>Further to this post , I'm very pleased to have been re-elected to the Council of the Institute and Faculty of Actuaries for what will now be my third term (for 3 years from 2019 to 2022). Many thanks to all those who supported me, and indeed all those who ...</description><content:encoded><![CDATA[<p>Further to <a href="https://pjlee.net/blog/i-am-standing-for-ifoa-council-again">this post</a>, I'm very pleased to have been re-elected to the Council of the <a href="https://actuaries.org.uk">Institute and Faculty of Actuaries</a> for what will now be my third term&nbsp; (for 3 years from 2019 to 2022).&nbsp; Many thanks to all those who supported me, and indeed all those who took part in the election, either by voting or standing as a candidate.&nbsp; It is an honour to have been part of a very strong field of candidates, and to be joining a very strong and diverse Council and Executive team.</p>
<p>I look forward to helping the Institute and Faculty of Actuaries, our members all around the world, and actuaries generally, to play the very significant part that I believe we can in helping businesses, organisations and individuals to make the most from artificial intelligence and big data, in an ethical way, in all types of business areas.&nbsp; The IFoA's forthcoming new <a href="https://www.actuaries.org.uk/news-and-insights/news/data-science-credential">Certificate in Data Science</a> (announced at this week's AGM by incoming President <a href="https://www.linkedin.com/in/john-taylor-52354811/">John Taylor</a>) is a very exciting new development and I am looking forward to finding out more as I rejoin Council.</p>
<p></p>
<p></p>]]></content:encoded></item><item><title>I just completed Microsoft's Computer Vision and Image Analysis course</title><link>https://pjlee.net/blog/i-just-completed-microsofts-computer-vision-and-image-analysis-course</link><media:content medium="image" url="https://cdn.buttercms.com/po0S38HSQ9aa7YDi5SC3" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 08 Jun 2019 15:42:00 +0000</pubDate><guid>https://pjlee.net/blog/i-just-completed-microsofts-computer-vision-and-image-analysis-course</guid><description>I recently completed the above Microsoft/edX course (full details of the course are here ) with a final mark of 92%. This was my 8th course on the Microsoft Professional Program for Artificial Intelligence, I plan to do my 9th course ( Reinforcement Learning Explained ) during the rest of ...</description><content:encoded><![CDATA[<p>I recently completed the above Microsoft/edX course (full details of the course are <a href="https://courses.edx.org/courses/course-v1:Microsoft+DEV290x+1T2019a/course/">here</a>) with a final mark of 92%.&nbsp; This was my 8th course on the <a href="https://academy.microsoft.com/en-us/tracks/artificial-intelligence">Microsoft Professional Program for Artificial Intelligence.</a>&nbsp;I plan to do my 9th course (<a href="https://courses.edx.org/courses/course-v1:Microsoft+DAT257x+1T2019a/course/">Reinforcement Learning Explained</a>) during the rest of this month, and then the final <a href="https://www.edx.org/course/microsoft-professional-capstone-artificial-intelligence-3">capstone course</a>&nbsp;in July.&nbsp; The capstone course&nbsp;is meant to be a real world test of doing AI work, applying knowledge learnt in the earlier courses.</p>
<p>This course was all about <strong>image segmentation</strong> (the ability for a computer to recognise the existence, location and class of different types of objects in an image, e.g. cars, buses, lane markings and pedestrians in an autonomous car application) and <strong>deep segmentation</strong>, the foundation of <strong>scene understanding</strong> (the ability of a computer to understand to what object in an image every pixel in the image belongs).</p>
<p>It seems that since about 2012, <strong>deep learning</strong> models (AI neural networks with many layers and parameters) have been outperforming traditional methods requiring human intervention (such as Viola Jones and Histogram Oriented Gradient also known as HOG) in vision processing problems.</p>
<p>Another major incremental step in vision processing is the process of<strong> transfer learning</strong>, where a deep learning model trained on one task (e.g. recognising one set of objects) can be reused in the same or similar problem domain on a different set of objects.&nbsp; This is because the earlier layers of the model normally enable it to recognise general features of objects (such as edges, corners) and it only needs to learn how to amend its final layers to recognise the specific features of the new set of objects.&nbsp;</p>
<p>The course required using Python and the computer vision part of the&nbsp;<a href="https://docs.microsoft.com/en-us/cognitive-toolkit/">Microsoft Cognitive Toolkit</a> (CNTK) in <a href="https://notebooks.azure.com">Jupyter notebooks</a> in Microsoft Azure.</p>]]></content:encoded></item><item><title>I just completed Microsoft's DevOps Practices and Principles course</title><link>https://pjlee.net/blog/microsoft-devops-practices-and-principles</link><media:content medium="image" url="https://cdn.buttercms.com/5oDxwBySq6YaPNXOlBwQ" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 28 May 2019 14:47:00 +0000</pubDate><guid>https://pjlee.net/blog/microsoft-devops-practices-and-principles</guid><description>I recently completed the above Microsoft/edX course (full details of the course are here ) with a final mark of 95%. Why is DevOps important? Huge increases in efficiency for tech companies #DevOps is the art and science of trying to automate/streamline as much as possible many stages (i.e. humans ...</description><content:encoded><![CDATA[<p>I recently completed the above Microsoft/edX course (full details of the course are <a href="https://courses.edx.org/courses/course-v1:Microsoft+DEVOPS200.1x+1T2019a/course/">here</a>) with a final mark of 95%.</p>
<h1>Why is DevOps important? Huge increases in efficiency for tech companies</h1>
<p>#DevOps is the art and science of trying to automate/streamline as much as possible many stages (i.e. humans are still involved in the writing of code) of producing and deploying software.</p>
<p>A formal definition is:</p>
<blockquote>
<p>DevOps is the union of people, process, and products to enable continuous delivery of value to our end users.&nbsp;You cannot buy DevOps and install it. DevOps is not just automation or infrastructure as code. DevOps is people following a process enabled by products to&nbsp;deliver value to end users. (Donovan Brown, Microsoft DevOps Program Manager).</p>
</blockquote>
<p>DevOps involves things like running automated tests before code is deployed, storing infrastructure and compliance requirements as code (thus increasing reproducibility when having to deploy to different environments/machines, and increasing confidence by regulators that organisations are less likely to break compliance via human error).&nbsp;</p>
<h1>Just tech companies? All companies will need to transition into tech companies to take advantage of big data and AI</h1>
<p>With the advent of big data and artificial intelligence, experts like <a href="https://www.linkedin.com/in/bernardmarr/">Bernard Marr</a> say that it is essential for companies in every industry to transition into technology companies if they want to stay ahead of the pack.&nbsp;Adopting a DevOps approach for technology companies can lead to huge reductions in flexibility and hence time to market.&nbsp; According to a 2017 report by Puppet Labs&nbsp; (now called just <a href="https://puppet.com/">Puppet</a>), high-performing I T organisations experience three times lower change failure rates and recover 24 times faster than their lower-performing peers.&nbsp; They also deploy 200 times more frequently.</p>
<p>Note: if you are contemplating doing this course, please note that (as often happens with edX courses) the instructions for the labs (exercises) seem to be quite a bit out of date, since both Microsoft's Azure platform and Visual Studio software have advanced quite a bit since they seem to have been written.</p>]]></content:encoded></item><item><title>I have just rejoined the Committee of the Wessex Actuarial Society as President</title><link>https://pjlee.net/blog/have-just-rejoined-the-committee-of-the-wessex-actuarial-society-as-president</link><media:content medium="image" url="https://cdn.buttercms.com/k61sADvOREqp13ibPop8" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 28 May 2019 11:27:00 +0000</pubDate><guid>https://pjlee.net/blog/have-just-rejoined-the-committee-of-the-wessex-actuarial-society-as-president</guid><description>Further to this post about my standing for Council of the Institute and Faculty of Actuaries, I am very pleased to announce that today I have rejoined the Committee of the Wessex Actuarial Society as its President. I look forward to working with the rest of the Committee and the ...</description><content:encoded><![CDATA[<p>Further to <a href="https://pjlee.net/blog/i-am-standing-for-ifoa-council-again">this post</a> about my standing for Council of the Institute and Faculty of Actuaries,&nbsp;<span>I am very pleased to announce that today I have rejoined the Committee of the Wessex Actuarial Society as its President. (I was previously President from 2008 to 2016).</span></p>
<p><span>I look forward to working with the rest of the Committee and the members of the Society over the next few years, particularly to try and promote Bournemouth and the Wessex region as a major centre of excellence for insurance and data science.</span></p>]]></content:encoded></item><item><title>Microsoft Professional Program for Big Data: my journey (Oct 2017 - Apr 2019)</title><link>https://pjlee.net/blog/microsoft-professional-program-for-big-data-my-journey-oct-2017-apr-2019</link><media:content medium="image" url="https://cdn.buttercms.com/WQyCku6zTtqghBJAV4DG" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 22 May 2019 20:29:00 +0000</pubDate><guid>https://pjlee.net/blog/microsoft-professional-program-for-big-data-my-journey-oct-2017-apr-2019</guid><description>I was very pleased to complete this program (a series of 10 courses) in April 2019, working in my spare time. Overview The 10 courses were: Microsoft Professional Orientation: Big Data (completed Oct 2017) Analyse and Visualize Data (completed on the Data Science program in July 2017) Work with NoSQL ...</description><content:encoded><![CDATA[<p>I was very pleased&nbsp; to complete this program (a series of 10 courses) in April 2019, working in my spare time. The Microsoft Academy page for this program is currently <a href="https://academy.microsoft.com/en-us/tracks/big-data/">here</a>.</p>
<h1>Overview</h1>
<p>The program involved taking 10 courses which were:</p>
<ol id="_hynE4v64ZFA6N2" dir="ltr">
<li id="_gIZsSsGUgWBU9q" dir="ltr">Microsoft Professional Orientation: Big Data (completed in October 2017)</li>
<li id="_XsaUoyIqFHrpC7" dir="ltr">Analyse and Visualize Data (completed on the Data Science program in July 2017)</li>
<li id="_aUKROAIuRoG8Qn" dir="ltr">Work with NoSQL Data (August 2018)</li>
<li id="_tN4mPn8qBi9TxZ" dir="ltr">Query Relational Data (completed on the Data Science program in June 2017)</li>
<li id="_aZ1wZgBHji5oL4" dir="ltr">Implement a Data Warehouse (September 2018)</li>
<li id="_VIvcrKAqptbEJb" dir="ltr">Process Big Data At Rest (December 2018)</li>
<li id="_OfqdCK9sUpYREu" dir="ltr">Process Big Data In Motion (February 2019)</li>
<li id="_RRkKQ1bsxOsxJR" dir="ltr">Orchestrate Big Data Workflows (February 2019)</li>
<li id="_NmdXw6MeEjjJHN" dir="ltr">Build Big Data Analysis Solutions (completed on the Data Science program in March 2018)</li>
<li id="_6u4oOVJH72jrvV" dir="ltr">Big Data Capstone Project&nbsp; (April 2019)</li>
</ol>
<p id="_6rdmW3GBJJKag6" dir="ltr">For several of the courses, alternative options were available (e.g. between Azure Data Lake Analytics and Hadoop for course 6, and between Azure Stream Analytics and Azure HDInsight for course 7). I chose the first option in each case to get to know the pure Microsoft technology because I felt that this would be more consistent and integrate more easily with the other Microsoft tools in their Azure cloud offering.</p>
<p dir="ltr">Note that although I started the program in October 2017 I didn't complete it until April 2019.&nbsp; That was because during May 2017 to April 2018 I was concentrating on completing Microsoft's Professional Program for Data Science (for my Data Science journey please see <a href="https://pjlee.net/blog/microsoft-professional-program-for-data-science-my-journey-may-2017-april-2018">here</a>).&nbsp; As noted above there was some overlap: three courses from the latter were also part of the Big Data program.&nbsp;&nbsp;</p>
<p dir="ltr">It took me 234 hours of part-time study to complete the Big Data program, 146 hours excluding the 3 courses that I had already completed as part of the Data Science program. My average mark across the 10 courses was 97.7%. (See <a href="https://pjlee.net/blog/a-few-tips-to-help-maximise-your-marks-on-online-courses-eg-edx">here</a> for some tips about how to achieve high marks in edX and other online courses).</p>
<p dir="ltr" class="text-danger"><span class="badge badge-danger">Caution:</span> for some of the labs (online exercises) the cloud computing resources can be quite expensive (&pound;10 or significantly more if you leave the resources idle for several days, as compared to $99 for each course), so I often waited until the end of the course before doing the labs (and then deleted the relevant cloud resources as soon as I had finished the labs).&nbsp;</p>
<h2 dir="ltr">What is Big Data?</h2>
<p>Precise definitions vary, but for this course "Big Data" was defined as a form of data with either a high <strong>volume</strong> (more than a million or two of records), or a large <strong>variety</strong> of formats (e.g. images, videos), or which comes very quickly (with high <strong>velocity</strong>).</p>
<p id="_zCEWy34MJvbhOq" dir="ltr">During the course we explored the management and analysis of several different types of big data, including:</p>
<ul id="_Dqdg859VUnEkny" dir="ltr">
<li id="_Y05Xa2Y2CSyvb1" dir="ltr">structured data (with a fixed schema - a fixed list of fields - and fixed relationships between different tables or sets of data)</li>
<li id="_fG88Mva4YeFOj0" dir="ltr">unstructured data (with a variable schema - a variable list of fields - or where the data could be very general, e.g. tweets or blog posts or other documents)</li>
<li id="_t20sn2dL6kPQ7L" dir="ltr">data at rest, where new records are added at regular intervals, e.g. once a day or once a week</li>
<li id="_y7c78dPXcoEpS1" dir="ltr">data in motion, where new records are added at very frequent intervals, e.g. in real time like stock market prices, or streaming data from Internet of Things ( IoT) devices.</li>
</ul>
<p id="_WmBd30XNvxca3W" dir="ltr">The final course was a capstone project which involved three separate challenges that tested my ability to build Big Data solutions for:</p>
<ul id="_KxSVyB0NUSQGYm" dir="ltr">
<li id="_8dy42aowwi1i46" dir="ltr">processing data at rest</li>
<li id="_gzzlDWsXeSgPL5" dir="ltr">processing data in motion, and</li>
<li id="_QjWrCPaWdEDXPX" dir="ltr">orchestrating a Big Data solution.</li>
</ul>
<p id="_JVZNxBAyASD8Jj" dir="ltr">I try to give a brief idea below of what was involved in each course in the program. Note: like many other online courses, the material is updated from time to time, so may have changed if you take the course at a later date.</p>
<h1 dir="ltr">Course 1: Big Data Orientation</h1>
<p id="_Ol0X6AbP9H2Axn" dir="ltr">This covered</p>
<ul id="_uud8M3nYq9KuPX" dir="ltr">
<li id="_NVCxfsleRYIuPK" dir="ltr">an introduction to data, data formats and data files, storing files in Azure (Azure Storage and Azure Data Lake Store)</li>
<li id="_gjLGjzOXWm62Wg" dir="ltr">an introduction to relational databases including data warehouses</li>
<li id="_lmb8NRxiDzNlfH" dir="ltr">in introduction to NoSQL databases (key-value, document and graph databases).&nbsp; SQL stands for Structured Query Language, and NoSQL can either stand for "No SQL" or "Not only SQL" and is useful for unstructured or semi-structured data such as blog posts or tweets</li>
<li id="_reo53ten4710zM" dir="ltr">an introduction to big data processing (what is big data, data at rest, data in motion, batch and real-time processing in Azure, batch and real-time processing in HDInsight)</li>
</ul>
<h1 dir="ltr">Course 2: Analysing and Visualising Data with Power BI</h1>
<p dir="ltr">I completed this as part of the Data Science program.&nbsp; This showed how to produce visuals (and perform some analysis) in Microsoft Power BI (Business Intelligence).</p>
<p dir="ltr"><img src="https://cdn.buttercms.com/oqHoSSRP2ChBHSi5IXwc" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p dir="ltr">Microsoft Power BI (like other programs e.g. Tableau) is very useful for producing interactive dashboards for senior management and others to extract insights from data.&nbsp; You can click on one chart to highlight a particular feature or filter the data, and all the other charts or tables adjust accordingly.</p>
<p dir="ltr"><img src="https://cdn.buttercms.com/qTpJl9yZRXee9S45XM4b" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p dir="ltr"></p>
<h1 dir="ltr">Course 3: Work with NoSQL Data</h1>
<p><span>NoSQL also known as "not only SQL" is often used for unstructured data (or at least data that is less structured than relational data, and for which the fields can vary for different types of records within the same table). </span></p>
<p id="_NiNmiiEHFU7dEn" dir="ltr">This covered an introduction to:</p>
<ul id="_cjg3v6CkHR1Jch" dir="ltr">
<li id="_DFx6haHfIwDMOX" dir="ltr">Key-Value stores, Azure storage tables</li>
<li id="_t0J6lzhsUyBJsR" dir="ltr">Azure Cosmos DB</li>
<li id="_gOmslJVVNl1RLf" dir="ltr">MongoDB</li>
<li id="_rqEa2anIvF1qTY" dir="ltr">More NOSQL database solutions (including Cassandra, Lucene &amp; Solr, Azure search, HBase and Redis)</li>
</ul>
<h1 dir="ltr"><span>Course 4: Querying with Transact-SQL</span></h1>
<p dir="ltr"><span>This was my second course from the Data Science Program and was also one of the courses on the Big Data Program.&nbsp; This taught how to query relational data to extract meaningful information.</span></p>
<p dir="ltr"><span>This screenshot shows one way of extracting related data from two different tables:</span></p>
<p dir="ltr"><span></span></p>
<p dir="ltr"><span><img src="https://cdn.buttercms.com/DKkO3GV8ThmxooyGCOM2" alt="MSDataScienceProgram5.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p dir="ltr"><span>This screenshot shows part of the course describing Stored Procedures (bits of code that run on the database server, which is often more efficient than extracting the relevant data and doing the processing on a different server, e.g. a web server):&nbsp;</span></p>
<p dir="ltr"><span><img src="https://cdn.buttercms.com/IyUoipjvTnWlD5kgYlt8" alt="MSDataScienceProgram6.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p dir="ltr"><span></span></p>
<h1 dir="ltr"><span>Course 5: Delivering a Data Warehouse in the Cloud</span></h1>
<p id="_XWFIPGcTl0jvZ3" dir="ltr">My 5th course was Delivering a Data Warehouse in the Cloud. This gave an introduction to SQL Data Warehouses, a specialised type of relational database where MPP (Massively Parallel Processing) can be used to query large volumes (hundreds of millions of records or more) of key data, which has usually been extracted from even larger volumes of raw data stored elsewhere.</p>
<p id="_vTpbcgnoHiKbLi" dir="ltr">Topics covered included:</p>
<ul id="_z2mtDifH3TuDfT" dir="ltr">
<li id="_CxgFfwiYVgdhPe" dir="ltr">Designing and querying data warehouses (distributed tables, replicated tables, partitioned tables, indices and statistics, monitoring queries)</li>
<li id="_CWpzgICM00lZDw" dir="ltr">Integrating data (loading data from raw data sources, including via Azure Data Factory, Azure Stream Analytics and Polybase).</li>
<li dir="ltr">Analyzing data with Azure Machine Learning, visualizing data with Power BI, and integrating with Amazon Athena and Redshift</li>
<li id="_zZSV6Pbe0lYwwd" dir="ltr">Managing data warehouses (including columnstore fundamentals, SQL data warehouse security, managing computations including analyzing workloads, and backups).</li>
</ul>
<p dir="ltr"><span></span>This screenshot shows the architecture of Azure SQL Data Warehouse, with Massively Parallel Processing:</p>
<p dir="ltr"><img src="https://cdn.buttercms.com/sKCUczviRPC3MdV2Jz2c" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<h1 dir="ltr"><span>Course 6: Process Big Data at Rest (with Azure Data Lake Analytics)</span></h1>
<p id="_L7aiyOdplYYGVr" dir="ltr">Course 6: Process Big Data at Rest (with Azure Data Lake Analytics). Topics covered included:</p>
<ul id="_UoGbCHoPYd2JcK" dir="ltr">
<li id="_rsUaSfGTzHxh3M" dir="ltr">an overview of Azure Data Lake, an introduction to U-SQL, U-SQL fundamentals (U-SQL is a language that allows you to combine SQL with C#)</li>
<li id="_f13XjEbXsF6I7z" dir="ltr">Using a U-SQL Catalog</li>
<li id="_XECLXwnX1ykvCq" dir="ltr">using C# functions in U-SQL</li>
<li id="_mvxImnIxP66X9V" dir="ltr">monitoring and optimizing U-SQL jobs</li>
</ul>
<p></p>
<h1><span>Course 7: Process Big Data in Motion</span></h1>
<p><span></span></p>
<p><span>My 7th course was Process Big Data in Motion, Processing Real-Time Data Streams in Azure. This gave an overview of how to process large volumes of streaming data, e.g. from IoT (Internet of Things) devices in real time. Topics covered included: </span></p>
<ul>
<li><span>ingesting real-time data with Azure Event Hubs</span></li>
<li><span> Ingesting real-time data with Azure IoT Hubs</span></li>
<li><span>Analysing real-time data using Azure Stream Analytics </span></li>
<li><span>Working with Temporal Windows</span></li>
</ul>
<p><span></span></p>
<h1><span>Course 8: Orchestrating Big Data Solutions</span></h1>
<p><span>Parallel or distributed processing is often required when doing big data extraction, transformation and analysis.&nbsp; Some means of orchestrating the different tasks (including checking that they have all run successfully, rerunning those that failed, alerting the user if reruns have been unsuccessful, doing the various steps in the right order, combining the output from different tasks etc) is needed. This course covered how to use Microsoft's solution to this problem, Azure Data Factory.</span></p>
<p><span>Topics covered included:</span></p>
<ul>
<li><span> Introduction to Azure Data Factory</span></li>
<li><span>Pipelines</span></li>
<li><span>Scheduling Pipelines</span></li>
<li><span>Transformations</span></li>
</ul>
<p><span>This screenshot shows Azure Data Factory's activity window explorer, which shows tasks that have completed successfully in green, those for which there is no data yet in grey, and those for which&nbsp; there is data but which haven't yet started in orange:</span></p>
<p><span><img src="https://cdn.buttercms.com/2FwCWpX7SVeacRhsFucX" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p><span>Processes which have run but failed are shown in red, as in this screenshot:</span></p>
<p><span><img src="https://cdn.buttercms.com/HDFta5FoSpmczrDjPw9K" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p><span></span></p>
<h1><span>Course 9: Analyzing Big Data with R</span></h1>
<p><span>My 9th course (which I completed previously as part of the Microsoft Professional Program for Data Science) was Analyzing Big Data with Microsoft R Server. Standard R is limited to the memory of the computer running it. This showed how to use Microsoft R server for larger datasets.</span></p>
<p><span>Screenshot showing an example of some R server code:</span><span></span></p>
<p><span><img src="https://cdn.buttercms.com/8dOXL7yQQ0atY6G6txUn" alt="MSDataScienceProgram29.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p><span></span>A screenshot showing some analysis of New York taxi data:</p>
<p><img src="https://cdn.buttercms.com/VqsrvzDJSOWZaWnZ5OvJ" alt="MSDataScienceProgram30.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<h1><span>Course 10: Capstone Big Data</span></h1>
<p id="_bTyDNKpDmECA4B" dir="ltr">The 10th and final course (completed in April 2019) was a capstone project (one designed to bring several earlier courses together) with three separate challenges that tested my ability to build Big Data solutions for:</p>
<ul id="_8gx6suJdhIpl9F" dir="ltr">
<li id="_CWCXBWVHTKI2Ft" dir="ltr">processing data at rest</li>
<li id="_DbFrlBJ3S1J9Bl" dir="ltr">processing data in motion, and</li>
<li id="_U54bJbJM3Dp0hI" dir="ltr">orchestrating Big Data solutions.</li>
</ul>
<h3><span>Challenge one: processing big data at rest</span></h3>
<p><span>This involved analysing data from about 16,000 text files, representing weekly stock inventory data during a full year for a large retail organisation with many stores. I had to extract the data, process it and send the processed data for each week to a data warehouse. Challenge one involved working on a particular week's data.</span></p>
<h3><span>Challenge two: processing big data in motion</span></h3>
<p><span>This involved receiving real-time stock adjustments from a simulated chain of retail stores, aggregating it over non overlapping one-minute intervals and analysing the results.</span><span></span></p>
<h3><span>Challenge three: orchestrating a Big Data solution</span></h3>
<p><span>This involved processing the weekly inventory data from challenge one by using Azure Data Factory to load data for each store and each week for a full year into a data warehouse and then analysing the output.</span><span></span></p>
<h1><span>Conclusions</span></h1>
<p><span>Storing and analysing big data (data of either large volume - e.g. more than a couple of million records, variety or velocity) requires quite different techniques from those normally used for smaller data sets. NoSQL databases can be very useful to handle unstructured data, or situations where the data schema may change in future. Different techniques are needed for handling real-time (streaming) data as compared to data at rest. In many big data situations, parallel or distributed processing is needed, together with some means (e.g. Azure Data Factory) to orchestrate (i.e. manage and combine) the different processes.&nbsp;</span></p>
<p><span>I found this professional program a very useful complement to the <a href="https://pjlee.net/blog/microsoft-professional-program-for-data-science-my-journey-may-2017-april-2018">Data Science program</a> (which covered predictive modelling itself, rather than how to use the very different techniques required to process big data).&nbsp;</span><span></span><span></span></p>]]></content:encoded></item><item><title>A little program to automate reformatting edX video transcript files more nicely</title><link>https://pjlee.net/blog/a-little-program-to-automate-reformatting-edx-video-transcript-files-more-nicely</link><media:content medium="image" url="https://cdn.buttercms.com/ua0OTEBURjaNFpO0hWGT" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 17 May 2019 14:14:00 +0000</pubDate><guid>https://pjlee.net/blog/a-little-program-to-automate-reformatting-edx-video-transcript-files-more-nicely</guid><description>Further to my previous post with tips about doing online edX courses, where I recommended downloading the transcript files of key course videos, you will usually find that by default when you copy and paste the content of the text (.txt) files into your (OneNote) notes, they aren't formatted very ...</description><content:encoded><![CDATA[<p>Further to my <a href="https://pjlee.net/blog/a-few-tips-to-help-maximise-your-marks-on-online-courses-eg-edx">previous post</a> with tips about doing online edX courses,&nbsp; where I recommended downloading the transcript files of key course videos, you will usually find that by default when you copy and paste the content of the text (.txt) files into your (OneNote) notes, they aren't formatted very nicely.</p>
<p>In particular there will often be far too many carriage returns, leading to a large number of rather narrow lines.</p>
<p>You can improve the formatting by hand by going through and removing the unnecessary carriage returns, but this is tedious and time consuming.</p>
<p>I wrote a small C# WPF (Windows Presentation Foundation) program to do this for me. You can download the code&nbsp; for this (for use free of charge, at your own risk, using say Microsoft Visual Studio) from <a href="https://github.com/patrickjlee/wpf-text-editor">this Github repository</a>.&nbsp;<span>(Github is a place where software developers can share and collaborate on code).</span></p>
<h1>To use this program</h1>
<p><span>In the edX course, click on the .txt file link for the video. This will normally put the transcript file (e.g. VideoTranscript.txt) in your downloads folder. </span></p>
<p><span>Run the WpfTextEditor project (in debug mode will do). The following window should appear:</span></p>
<p><span><img src="https://cdn.buttercms.com/9snANXgyQ1ioeROoSAim" alt="WpfTextEditor1.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p><span>Click the Run button. </span></p>
<p><span>Use the common dialog box that appears to navigate to the .txt file that you wish to reformat the contents of more neatly (e.g.Downloads\VideoTranscript.txt). </span></p>
<p><span><img src="https://cdn.buttercms.com/Nw865P53TNWqdZhHcfGM" alt="WpfTextEditorSelectFile.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p><span>Select the desired transcript file (e.g. VideoTranscript.txt) file and click the Open button. </span></p>
<p><span>The program should read in the contents of the text file, reformat it more neatly and put the results into the Output text box of the program's window:</span></p>
<p><span><img src="https://cdn.buttercms.com/mP6mJc0oTmMaDt6d18Yp" alt="WpfTextEditor2.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p><span>Click somewhere inside the Output text box then (on a Windows machine) press Ctrl+A (to select all the text):</span></p>
<p><span><img src="https://cdn.buttercms.com/WpG04fRZRMCBA04aWMex" alt="WpfTextEditorSelectAllOutputText.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></span></p>
<p><span>Then type&nbsp;</span><span>Ctrl+X (to cut all the text). You should then be able to paste (Ctrl+V) the formatted video transcript text into the relevant place (e.g. the relevant part of your OneNote page for the module containing the video).</span></p>
<h1><span>Conclusion</span></h1>
<p><span>This should make your notes of the videos in the course more readable. I also recommend taking screenshots of key parts of the videos and pasting them at the relevant places in your transcript notes.</span></p>
<p></p>
<p></p>
<p></p>
<p></p>]]></content:encoded></item><item><title>A few tips to help maximise your marks on online courses (e.g. edX)</title><link>https://pjlee.net/blog/a-few-tips-to-help-maximise-your-marks-on-online-courses-eg-edx</link><media:content medium="image" url="https://cdn.buttercms.com/Msr61dL6QtaZeUAMw1yw" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 13 May 2019 08:59:00 +0000</pubDate><guid>https://pjlee.net/blog/a-few-tips-to-help-maximise-your-marks-on-online-courses-eg-edx</guid><description>I have now taken 24 online edX courses, mainly on #DataScience, #BigData and #AI. The pass mark on these has been 70%, but being a bit of a perfectionist, I have always tried for 100%. (After all, would you really want an airline pilot who got things right 70% of ...</description><content:encoded><![CDATA[<p>I have so far taken 24 online edX courses, mainly on #DataScience, #BigData and #AI.&nbsp; The required pass mark on these has been 70%, but being a bit of a perfectionist, I have always tried for 100%. (After all, would you really want an airline pilot who got things right 70% of the time? Or worse, a surgeon? :)</p>
<p>I've not managed to quite achieve this, my average mark on the courses is about 97%, for reasons which I will set out below.</p>
<p>For anyone interested, here are a few tips from my experience so far on how to maximise your marks on edX courses (and I think they should also be useful for other online courses):</p>
<h1>Take comprehensive notes (I used Microsoft OneNote, one page for each module)</h1>
<p>For each module in an edX course, I usually copy most of the text from each edX page and paste it into OneNote page.&nbsp; I also do this for most of the transcripts from the videos, and I take screenshots of key parts of videos and paste them into the same OneNote page.&nbsp;</p>
<p>Here is an screenshot showing the start of a OneNote page I used to take notes of a module in the "Delivering a Data Warehouse in the cloud" course:</p>
<p></p>
<p><img src="https://cdn.buttercms.com/tuWD9NTTGLnjISxaJVpw" alt="ExampleNoteOfEdXCourseModuleInOneNote..." style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p></p>
<p></p>
<p>I also take copies of the assessment questions, and keep a record of my answers to the questions. (<em>NB the notes you take must be for your personal use and not to be shared with others, in order to comply with the edX Honour Code and terms of use</em>).</p>
<h2>Why are comprehensive notes useful?</h2>
<ol>
<li>When answering the assessment questions, you can use OneNote's very powerful search facility to search (usually within the same page using Ctrl+F, since the questions for a module should relate to that module, but otherwise Ctrl + E to search across all your notebooks) to find relevant parts of the course. If you haven't taken notes, you will need to either be able to remember all the material (not always possible, as there is a lot), or search back through the pages and videos on edX.</li>
<li>The search facility in OneNote is also very useful when doing the labs (exercises) and the final exam/assessment at the end of the course. (Like the real world of work, edX exams are open book, so it is perfectly fine to search your notes - or even the internet - and that's fine, because that is what people do day in and day out in their jobs.&nbsp; What matters is getting the right answer, providing of course you are not cheating by getting someone else to do the questions for you.)</li>
<li>You are likely to need some of the material months or even years after you have finished the course, and it may not longer be available on the edX site. Many times I have needed to do something in real life work and have been able to refer to my notes to save me (and colleagues) a lot of time.</li>
</ol>
<p>Incidentally, I recommend using OneNote for many other aspects of your work, not just taking notes from online courses.&nbsp; I find it very useful to store things like: problems and how I managed to solve them, how I set up things in Azure (so that the next time I do something similar I can use that as a template), notes of meetings etc.</p>
<h1>Whenever possible, check your answers in practice before submitting them</h1>
<p>If the assessment or exam question involves writing code (whether it be T-SQL or USQL for database queries, or HTML or CSS or javascript for web pages, or R/Python/C# for machine learning, or PowerBI/Tableau/Excel for data visualisation), you will often have the opportunity to try out your proposed answer in one or more tools (e.g. SSMS [Sql Server Management Service] for T-SQL, Visual Studio Code/Visual Studio/CodePen or even just Notepad or other basic text editor and a browser for HTML/CSS/javascript, Azure Machine Learning Studio or Jupyter Notebooks for R/Python/C# snippets, Visual Studio Code or Visual Studio 2019 for C# code).&nbsp;</p>
<h1>Use your problem solving skills: if the suggested method isn't working for you, try another, and another!</h1>
<p>Sometimes the edX instructions for online labs (exercises) are out of date, so you can't follow them exactly.&nbsp; Or there might be some other reason why the suggested approach isn't working for you.&nbsp; Well, just as you would do in your real life work, you will often be able to think of another way to attack the problem.&nbsp;</p>
<p>For example, instead of analysing data using T-SQL, you might be able to do it using PowerBI, Tableau, or just Excel!&nbsp; (Even if the data won't fit into an Excel worksheet, because there are more records than Excel's current maximum number of rows of just over a million,&nbsp; you can use Power Pivot and Excel's Data Model, together with Pivot Tables and charts to analyse it).</p>
<h1>What went wrong, why didn't I get 100%?</h1>
<p>For maths/IT questions, I believe that with diligent study one should usually be able to get 100%, assuming the course is well taught. (This is in contrast to business questions, where often there is no right answer - or more than one, and arts/humanities questions, where again many different answers may be possible and subjectivity is usually unavoidable in the marking process).</p>
<p>So I am always disappointed not to get 100% on these edX courses, and that has happened on several courses, which is why my average mark on the courses I have taken so far is about 97%.</p>
<p>So what went wrong?</p>
<ul>
<li>In some cases this was human error on my part: I made a mistake (in particular, some of the final exams are timed, and I either didn't have time to check my answer in practice using one of the methods suggested above, or to find the relevant notes in my OneNote pages, or my notes were not sufficiently comprehensive)</li>
<li>In some other cases it was human error on the part of edX: in some cases the edX course material is out of date (e.g. has not reflected changes to the Microsoft Azure portal within the last 6 months or more), or the questions are ambiguous (on some courses the material has many spelling mistakes, so other errors are not surprising), or the questions are on material that has not been covered in the course</li>
<li>it can be much harder to achieve over 90% on the Capstone courses (the final ones in each Professional Program) because - quite rightly - the projects are much more open ended with much less guidance, so as to test that you are able to perform relevant work without being guided step by step through the process. And for a machine learning exercise, there will usually not be a single "right" predictive model to use.</li>
</ul>
<p></p>
<p>I hope you have found this post useful.&nbsp; As ever, I welcome your feedback!</p>]]></content:encoded></item><item><title>Valuing large pension plans more quickly and cost effectively using Azure Functions (Part 2)</title><link>https://pjlee.net/blog/valuing-large-pension-plans-more-quickly-and-cost-effectively-using-azure-functions-part-2</link><media:content medium="image" url="https://cdn.buttercms.com/RPg0c86dR9y4nGeGD1tl" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 08 May 2019 19:01:00 +0000</pubDate><guid>https://pjlee.net/blog/valuing-large-pension-plans-more-quickly-and-cost-effectively-using-azure-functions-part-2</guid><description>In Part 1 , I wrote: When done accurately and before any clever processing, the number of cashflows produced can easily run into the millions , and for a large pension plan, into the billions . (When I have time, I plan to explain why, and talk about some of ...</description><content:encoded><![CDATA[<p>In <a href="https://pjlee.net/blog/experiments-using-azure-functions-v-2-repeatedly-and-with-multiple-queues-part-1">Part 1</a>, I wrote:</p>
<blockquote>
<p>When done accurately and before any clever processing, the number of cashflows produced can easily run into the&nbsp;<strong>millions</strong>, and for a large pension plan, into the&nbsp;<strong>billions</strong>. (When I have time, I plan to explain why, and talk about some of the clever processing that can be done).</p>
<p>This situation is one that obviously calls for parallel or distributed processing, with the work shared out between many machines.</p>
</blockquote>
<p>In this post, I explain why so many cashflows are produced when calculations are done accurately.</p>
<h2>Example UK defined benefit pension plan</h2>
<p>Let's consider an example UK defined benefit pension plan, with roughly equal numbers of active, deferred pensioners and pensioners. (Individual pension plans will differ significantly from this, but this simplistic mix is not far from reality for several large pension plans). Let's assume that the pensioners are split in the ratio 20:14 between pensioners and partners (widows/widowers) - again simplistic but not unreasonable/atypical.</p>
<p>For round numbers, let's assume 33% active membership, 33% deferred pensioners (dps), 20% pensioners and 14% partners. For illustration, let's also assume that the average age of the actives is 37, those of the dps is 48, the pensioners 69 and the partners 73.&nbsp; For simplicity, we will take members of these ages as representative model points for each class, and later on we will apply the 33%/33%/20%/14% weightings to determine the expected total number of cashflows. (The true calculation adds up the cashflows from each member in each membership category, but for ease of demonstration the approach taken in this article will suffice to illustrate the point. We will also see that the average age assumed for categories other than active members is of relatively little importance: it is the actives who produce the vast bulk of the cashflows).&nbsp;</p>
<p>We will also assume for simplicity that pension plan members have a partner who is 3 years younger than them. (Again, in practice this will vary, but this is not a material factor in determining the scale of the number of cashflows required).&nbsp;</p>
<p>Let's also assume that the pension plan's normal retirement age is 65, and that on average, members have two different slices of benefits (i.e. their benefits are split into two parts, each of which - due to changes in plan rules or legislation - has different pension increases or other behaviour).&nbsp; Let's also assume that one of those slices includes some GMPs (Guaranteed Minimum Pensions), and that the terminal age of the mortality tables used is 120, i.e. no member or their partner is assumed to live beyond age 120).</p>
<h2>How many cashflows should we expect from each of our representative members?</h2>
<p><img src="https://cdn.buttercms.com/P6Hi30zMRV2m5KgzY4Yj" alt="PensionPlanRawCashflowsByCategory.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<h2>385 cashflows arising from the partner (widow/widower) member</h2>
<p>The simplest case is that of the partner.&nbsp; Here for each benefit slice, payments will continue to be made from the current age, 73, to the terminal age, 120.&nbsp; So for the slice without GMPs there should be 120 - 73 = 47 years of payments. In reality there would be&nbsp;47 * 12 = 564 monthly payments,&nbsp; probably 570 payments including the final six during age 120 (death occurs <b>after</b> reaching that age and to first order is assumed to occur half way through the year).&nbsp; But it is common in pension plan projections to use annual payments.&nbsp; &nbsp;(If we don't then the number of cashflows is further increased beyond the already large numbers shown in this post).&nbsp;</p>
<p>To allow for discounting and pension increases during the year, the 12 monthly payments can be approximated very well by two payments, one at the beginning and one at the end of each projection year.</p>
<p>That leads to 47 * 2 + 1 = 95 cashflow payments (including the very last one, paid on reaching age 120.&nbsp;&nbsp;</p>
<p>That is for the benefit slice without GMPs.&nbsp; For the slice including GMPs, there will be 3 times as many payments (excess over GMP, Pre 1988 GMP, and Post 1988 GMP).&nbsp; (Technically speaking, for a female partner, there would have been no pre 1988 GMP, but we will ignore this for the purposes of this post, and besides the recent ruling on GMP equalisation may change this retrospectively!).</p>
<p>So we have 95 * (1 + 3) = 385 cashflows for the partner.</p>
<h2>12k cashflows arising from the pensioner member</h2>
<p>This is slightly more complicated, because as well as the cashflows being paid to the pensioner, we need to allow for cashflows being paid each year (and subsequent years) to a new partner member of the plan on death of the pensioner during each projection year.&nbsp;(For simplicity I am ignoring here and below the very small number of cashflows arising from payment of a lump sum to a deferred pensioner or active on retirement, and also on the death of a pensioner under a pensions guarantee period, normally&nbsp; of up to 5 years).</p>
<p>Given that the age of the pensioner is 69, there will be (following the approach shown above for the partner), there will be 120 - 69 = 51 years of payments, leading to 51 * 2 + 1 = 103 payments allowing for a final payment on reaching age 120. That would be for the benefits slice with no GMP.&nbsp; After allowing for the slice with a GMP, in total there will be 103 * (1 + 3) = 412 cashflows paid to the pensioner.</p>
<p>But for each projection year (from age 69 to 120, including the year following on from age 120 to 121), there is a non zero probability that the pensioner will die during the year, so 120 - 69 + 1 = 52 occasions on which partner payments start being paid. (Of course these partners are normally assumed to be all the same person and that is one of the bits of processing that can be done to cut down the number of cashflows, but for the moment we are talking about the number of raw cashflows that need to be produced).&nbsp; Each of these will have two benefit slices, one of which includes GMP.&nbsp;</p>
<p>Analogously to the approach shown above for the partner aged 73, the partner arising on death of the pensioner during the year of age 69 to 70 will be aged 69 - 3 = 66 (66.5 in practice but I am ignoring&nbsp; the half year for simplicity in this post) and will lead to 120 - 66 = 54 years of payments, leading to 54 *2 + 1= 109 cashflows. The partner arising on death during the year of age 70 to 71 will lead to 120 - 67 + 1 = 53 years of payments, leading to 53 * 2 + 1 = 107 cashflows, etc, right up to the partner arising on death during the year of age 120 to 121 leading to 120 - 117 = 3 years of payments with 3 * 2 + 1 = 7 cashflows.&nbsp;&nbsp;</p>
<p>This is a total of 109 + 107 + 105 + .... + 7 = 3,016 cashflows.&nbsp;</p>
<p>Allowing for the two slices, one of which has GMPs, this means that the total number of cashflows paid to partners is 3016 * (1 + 3) = 12,064.</p>
<p>Overall, the number of cashflows arising from the pensioner member is 412 + 12064 = 12,476.</p>
<h2>23k cashflows arising from the deferred pensioner member</h2>
<p>This is slightly more complicated still, because as well as the cashflows that will be paid on (and following) retirement to the deferred pensioner (and to a partner on death after retirement), we need to allow for cashflows being paid each year (and subsequent years) to a new partner member of the plan on death of the deferred pensioner <strong>before</strong> retirement. (We could also allow for potential early retirement of the deferred pensioner on ill health, but unlike for active members, where the benefits on ill health retirement can be more generous and hence more financially significant, this complication has been commonly ignored - because leading to a slight overstatement of the liability, hence a slight element of prudence - in the valuation of deferred pensioners.&nbsp; So I ignore this here for simplicity).</p>
<p>Analogously to the approach taken above for the pensioner member, but applied to a pensioner aged 65 (the normal retirement age), that pensioner will lead to&nbsp;</p>
<p>(120 - 65) * 2 + 1 = 111 payments for the slice without GMP, and a total of 111 * (1 + 3) = 444 cashflows paid to the pensioner.&nbsp;</p>
<p>Plus, on death of the pensioner <strong>after</strong> retirement, starting with 120 - 62 = 58 years of payment or 58 * 2 + 1 = 117 cashflows:&nbsp;</p>
<p>117 + 115 + 113 + ... + 7 = 3,472 cashflows paid to the partner for the slice with no GMPs, and a total of 3472 * (1 + 3) = 13,888 cashflows paid to a partner arising from death after retirement.</p>
<p>Analogously, for death&nbsp; <strong>before</strong> retirement (during the period of years of age 48-49, 49-50 up to 64-65), starting with (120 - 45) * 2 + 1 = 151, and ending with (120 - 61) * 2 + 1 = 119:</p>
<p>151 + 149 + .... + 119 = 2,295 cashflows paid to the partner for the slice with no GMPs, and a total of 2295 * 4 = 9,180 cashflows paid to a partner arising from death before retirement.</p>
<p>Overall the number of cashflows arising from the deferred pensioner member is 444 + 13,888 + 9,180 = 23,512.</p>
<h2>Over half a million cashflows arising from the active member!</h2>
<p>This is considerably more complicated because,&nbsp;before normal retirement age 65, we also need to allow for leaving service, ill health retirement and death in service.</p>
<p>Exactly analogously to the approach taken for the deferred pensioner member, there will be a total of 444 + 13,888 = 14,332 cashflows arising from normal retirement at age 65.</p>
<p>But in addition, there are huge numbers of cashflows arising during each of the years of age 37 to 38, 38 to 39, ..., 64 to 65&nbsp; from possible:</p>
<ul>
<li>leaving service: each deferred pensioner created will generate several thousand cashflow records (some 23,000 on leaving service at age 48 as you can see from the dp case above, more at younger ages)</li>
<li>retirement on ill health: each ill health pensioner created will generate fewer but still several thousand cashflow records (in each case more than the 14,332 generated at age 65 on normal retirement, because the member is younger)&nbsp;&nbsp;</li>
<li>death in service: each partner created will generate over a hundred cashflow records</li>
</ul>
<p>The calculations are clearly very tedious to do by hand (or with Excel), so I used software (InQA Limited's <a href="https://pensionsconcerto.com">Pensions Concerto</a> valuation and cashflow projection tool).</p>
<p>Overall the number of cashflows arising from the active member (this time including the small number of extra cashflows arising from lump sums on retirement, and payment of pension guarantees on death) was over half a million at 646,228.&nbsp;</p>
<h2>How many raw cashflows need to be produced for a medium plan? for a very large plan?</h2>
<p><img src="https://cdn.buttercms.com/RPg0c86dR9y4nGeGD1tl" alt="PensionPlanNumbersOfRawCashflows.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p>For a thousand member pension plan, with the membership weighted in the stated proportions (33% actives, 33% deferred pensioners, 20% pensioners and 14 % partners), and using the above members as broadly representative, the number of cashflows produced is:</p>
<p>330 * 646,228 + 330 * 23,512 + 200 * 12,476 + 140 * 385 = 223,563,300 or <strong>224 million</strong>.</p>
<p>As mentioned before, the actives clearly produce the vast bulk of the cashflows (95% in this case), so it matters relatively little what average age is assumed for the other membership categories.</p>
<p>For a million member plan, the number of cashflows produced would be <strong>224 billion</strong>.&nbsp;</p>
<p>This is not all.&nbsp; For a continuing pension plan, it is usually necessary to calculate the contribution rate required to fund future accrual, both during a short term period (e.g. the next year), and during the future working lifetime of current active members. In order to do this, <strong>three sets of cashflows</strong> need to be calculated for active members: the above one (for past service, based on benefits accrued at the valuation date), the benefits that will be produced allowing for accrual during the short term period (e.g. the next year), and the benefits that will be produced allowing for accrual during the future working lifetime.</p>
<h2>These are the raw cashflows.&nbsp; Can we do anything to speed up the processing?</h2>
<p>The above are the cashflows that need to be produced at some point during the calculations, in order to do things accurately before any smart processing, and if you want to be able to value each member individually. This <strong>can</strong> be done with distributed processing and big data treatment/storage.</p>
<p>Of course instead of performing the calculations on individual members, you could perform the calculations on grouped data. If you do this, it is important to make sure the members grouped together are homogeneous with regard not only to demographic factors (age, gender etc), but also with regard to the nature of their benefit slices.&nbsp; <strong>But of course by doing this, you lose the ability to produce accurate member by member values, split by benefit type, slice and decrement</strong>.&nbsp; ("Decrement" here means the mode of exit, e.g. death, leaving service, retirement etc).&nbsp;&nbsp;</p>
<p>Instead, the approach I prefer is to continue to produce the raw cashflows, and to keep them separately for each member, but to combine them as far as possible (again for each member) without losing the information about benefit type and nature.&nbsp; This means not only that accurate values split for each member by benefit are produced, but <strong>information for accurate risk management (for stochastic modelling or for cashflow matching by nature and type) is preserved</strong>.</p>
<p>One example is that for a given member, benefit type, slice and decrement, cashflows at the end of year n and the start of year n+1&nbsp; can be combined without loss of accuracy, because they have the exact same characteristics including the date of payment.</p>
<p>With this and other smart processing, the number of cashflows that need to be retained can be reduced by a factor of 100 or even more.</p>
<p>&nbsp;</p>
<p></p>
<p></p>
<p></p>]]></content:encoded></item><item><title>I am standing for IFoA Council again</title><link>https://pjlee.net/blog/i-am-standing-for-ifoa-council-again</link><media:content medium="image" url="https://cdn.buttercms.com/rSjSnXytT6u3U3zI6KBW" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 07 May 2019 15:25:00 +0000</pubDate><guid>https://pjlee.net/blog/i-am-standing-for-ifoa-council-again</guid><description>Earlier today I submitted my nomination to stand for the Council of the Institute and Faculty of Actuaries again. I was on the Council from July 2012 to June 2018, and server on the Management Board from July 2016 to June 2018. The main skill-set I bring to the table ...</description><content:encoded><![CDATA[<p>Earlier today I submitted my nomination to stand for the Council of the <a href="https://actuaries.org.uk">Institute and Faculty of Actuaries</a> again. I was on the Council from July 2012 to June 2018, and served on the Management Board from July 2016 to June 2018.&nbsp;</p>
<p>The main skill-set I bring to the table is extensive experience of IT including cloud technology and (increasingly) big data/data science/artificial intelligence. I believe there is still much to do to help our members remain relevant in a world that is likely to be ever more dominated by data analytics and AI. With my background I feel well placed to help.&nbsp;</p>]]></content:encoded></item><item><title>How to add Tag and Category Clouds to a blog running ButterCMS</title><link>https://pjlee.net/blog/how-to-add-tag-and-category-clouds-to-a-blog-running-buttercms</link><media:content medium="image" url="https://cdn.buttercms.com/BQ60OhGR820HsLpyT7gS" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Sat, 04 May 2019 22:03:00 +0000</pubDate><guid>https://pjlee.net/blog/how-to-add-tag-and-category-clouds-to-a-blog-running-buttercms</guid><description>Popular self-service blog platforms like WordPress allow to you add Tag Clouds via adding what they call a widget to a sidebar. I wanted to add one to this site (which is a standard ASP.NET Core 2.2 webapp, but modified to use ButterCMS as a blog backend) and after checking ...</description><content:encoded><![CDATA[<p>Popular self-service blog platforms like <a href="https://wordpress.com/">WordPress</a> allow to you add Tag Clouds via adding what they call a widget to a sidebar.</p>
<p>I wanted to add one to this site (which is a standard ASP.NET Core 2.2 webapp, but modified to use <a href="/">ButterCMS</a> as a blog backend) and after checking with the team at ButterCMS that a facility to do this didn't already exist, I decided to have a go at creating one.&nbsp; This is the result.</p>
<p>A word cloud is a useful rough visualisation of the relative frequency of particular words, either within an article, or in the case of a Tag Cloud for a blog, how many articles a particular tag has been added to.&nbsp; Tags which are more frequently used are shown in larger font than tags which are less frequently used, and each word in the cloud has a hyperlink taking you to the articles related to that tag.</p>
<p>Here's how relative frequencies can be calculated, and then saved to an Azure Table using the existing <a href="/asp-net-blog-engine/">ButterCMS API</a> (Application Programming Interface) methods (perhaps in future ButterCMS might add APIs to produce this information more directly):</p>
<h3>Azure Function (to retrieve the necessary information and update an Azure Storage Table with the latest information once a day)</h3>
<p></p>
<pre class="language-csharp"><code>// Date        Who Comments 
// 04 May 2019 PJL Created to cache the information needed for Tag Clouds and Category Clouds from a ButterCMS blog (to avoid slowing down the website)
//                 At the moment, this function updates the cache table daily
// 04 May 2019 PJL Version 1.0 of FunctionApp1.UpdateTables
// **************************************************************

using ButterCMS;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using Microsoft.WindowsAzure.Storage; // added for CloudStorageAccount
using Microsoft.WindowsAzure.Storage.Table; // added for Table
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FunctionApp1
{
    public static class UpdateTables
    {
        [FunctionName("UpdateTables")]
        // NB [TimerTrigger("0 0 0 */1 * *")] means every 1 day
        public async static Task Run([TimerTrigger("0 0 0 */1 * *")]TimerInfo myTimer, ILogger log)
        {
            var apiToken = GetEnvironmentVariable("ButterCMSApiKey");
            var client = new ButterCMSClient(apiToken);
            var tagCloudRecords = new List&lt;WordCloudRecord&gt;();
            var response = await client.ListTagsAsync(false);
            var tags = response;
            foreach (var item in tags)
            {
                var page = 1;
                var postsResponse = await client.ListPostsAsync(page, 10, true, null, null, item.Slug);
                var posts = postsResponse.Data;
                tagCloudRecords.Add(new WordCloudRecord { PartitionKey = "Tag", RowKey = item.Name, count = posts.Count(), slug = item.Slug });
            }
            SetRelativeFrequenciesOfAListOfCloudRecords(tagCloudRecords);

            var categoryCloudRecords = new List&lt;WordCloudRecord&gt;();
            var response2 = await client.ListCategoriesAsync(false);
            var categories = response2;
            foreach (var item in categories)
            {
                var itemResponse = await client.RetrieveCategoryAsync(item.Slug, false);
                var page = 1;
                var postsResponse = await client.ListPostsAsync(page, 10, true, null, item.Slug);
                var posts = postsResponse.Data;
                categoryCloudRecords.Add(new WordCloudRecord { PartitionKey = "Category", RowKey = item.Name, count = posts.Count(), slug = item.Slug });
            }
            SetRelativeFrequenciesOfAListOfCloudRecords(categoryCloudRecords);

            var connectionString = GetEnvironmentVariable("NameForYourAzureStorageAccountSetting");
            var storageAccount = CloudStorageAccount.Parse(connectionString);
            var tableClient = storageAccount.CreateCloudTableClient();
            var tableName = "NameOfYourWordCloudsTable";
            var table = tableClient.GetTableReference(tableName);

            var types = new List&lt;string&gt; { "Tag", "Category" };
            foreach (var type in types)
                await DeleteRecordsOfThisType(table, type);

            // add the new records to the table for each type. NB each record in a batch operation must have the same partition key
            await AddBatchOfRecordsToTable(tagCloudRecords, table);
            await AddBatchOfRecordsToTable(categoryCloudRecords, table);

            log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
        }

        private static void SetRelativeFrequenciesOfAListOfCloudRecords(List&lt;WordCloudRecord&gt; records)
        {
            int totalNumber = (from i in records
                               select i.count).Sum();
            foreach (var item in records)
            {
                if (totalNumber != 0)
                    item.frequency = (double)item.count / (double)totalNumber;
                else
                    item.frequency = 0;
            }
        }

        private static async Task DeleteRecordsOfThisType(CloudTable table, string type)
        {
            TableQuery&lt;WordCloudRecord&gt; query = new TableQuery&lt;WordCloudRecord&gt;().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, type));
            TableContinuationToken token = null;
            do
            {
                TableQuerySegment&lt;WordCloudRecord&gt; resultSegment = await table.ExecuteQuerySegmentedAsync(query, token);
                token = resultSegment.ContinuationToken;
                foreach (WordCloudRecord entity1 in resultSegment.Results)
                {
                    TableOperation deleteOperation = TableOperation.Delete(entity1);
                    // Execute the operation.
                    await table.ExecuteAsync(deleteOperation);
                }
            } while (token != null);
        }

        private static async Task AddBatchOfRecordsToTable(List&lt;WordCloudRecord&gt; records, CloudTable table)
        {
            TableBatchOperation batchOperation = new TableBatchOperation();
            foreach (WordCloudRecord item in records)
                batchOperation.Insert(item);
            // Execute the batch operation.
            await table.ExecuteBatchAsync(batchOperation);
        }

        private static string GetEnvironmentVariable(string name)
        {
            return
                Environment.GetEnvironmentVariable(name, EnvironmentVariableTarget.Process);
        }
    }

    public class WordCloudRecord : TableEntity
    {
        public WordCloudRecord(string type, string name)
        {
            this.PartitionKey = type;
            this.RowKey = name;
        }

        public WordCloudRecord() { }

        public int count { get; set; }
        public double frequency { get; set; }
        public string slug { get; set; }
    }
}
</code></pre>
<p>What the above code does is (within an Azure Function version 2 triggered by a timer once a day):</p>
<ol>
<li>Use the ButterCMS API to retrieve a list of Tags, and for each tag extract the number of blog posts which are tagged with that tag.</li>
<li>For each tag, it populates a WordCloudRecord (a record to be stored in the Azure Table) with all the necessary fields except the (relative) frequency.</li>
<li>It then calculates the relative frequency for each tag and adds this to each record in the list of tag records (tagCloudRecords).</li>
<li>It does the same for Categories, to produce a list of category records (categoryCloudRecords).</li>
</ol>
<p>At this point, the code could be used within the Home and or Blog controllers of the website but this would mean that the calls in steps 1 to 4 will be made on each page that you want to display the tag or category clouds on, which could significantly slow down your site's responsiveness.&nbsp;</p>
<p>So instead, the above Azure Function runs once a day to extract the information and store it within an Azure Storage Table. This should give reasonably accurate tag and category clouds, unless you are publish a very large number of posts on a particular day compared to the total number of posts so far (or if you create new tags or categories during the day).&nbsp; But the next day the clouds will be up to date again.</p>
<p>Your website can then retrieve the cached information from the Azure table for each view where you want to display the tag and/or category clouds.</p>
<p>For example within an MVC controller where you want the Home/Index and Home/ShowClouds view to show the tag and category clouds (but you could instead put the clouds in a sidebar):</p>
<h3>Example MVC Controller: HomeController.cs</h3>
<pre class="language-csharp"><code>using ButterCMS; // added for ButterCMSClient
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration; // added for IConfiguration
using Microsoft.WindowsAzure.Storage; // added for CloudStorageAccount
using Microsoft.WindowsAzure.Storage.Table; // added for Table
using Project.Models;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;

namespace Project.Controllers
{
    public class HomeController : Controller
    {
        private ButterCMSClient client;
        private readonly string _connectionString;

        public HomeController(IConfiguration configuration)
        {
            var apiToken = configuration["ButterCMSApiKey"];
            client = new ButterCMSClient(apiToken);
            _connectionString = configuration["NameForYourAzureStorageAccountSetting"];
        }

        public async Task&lt;ActionResult&gt; Index()
        {
            return View();
        }

        public async Task&lt;ActionResult&gt; ShowClouds()
        {
            await GetTagAndCategoryCloudRecords();
            return View();
        }

        private async Task GetTagAndCategoryCloudRecords()
        {
            var storageAccount = CloudStorageAccount.Parse(_connectionString);
            var tableClient = storageAccount.CreateCloudTableClient();
            var tableName = "NameOfYourWordCloudsTable";
            var table = tableClient.GetTableReference(tableName);

            var tagCloudRecords = await ObtainListOfRecordsOfGivenType(table, "Tag");
            var categoryCloudRecords = await ObtainListOfRecordsOfGivenType(table, "Category");
            ViewBag.tagCloudRecords = tagCloudRecords;
            ViewBag.categoryCloudRecords = categoryCloudRecords;
            ViewBag.ShowSideBar = true;
        }

        private static async Task&lt;List&lt;WordCloudRecord&gt;&gt; ObtainListOfRecordsOfGivenType(CloudTable table, string type)
        {
            List&lt;WordCloudRecord&gt; list = new List&lt;WordCloudRecord&gt;();
            TableQuery&lt;WordCloudRecord&gt; query = new TableQuery&lt;WordCloudRecord&gt;().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, type));
            TableContinuationToken token = null;
            do
            {
                TableQuerySegment&lt;WordCloudRecord&gt; resultSegment = await table.ExecuteQuerySegmentedAsync(query, token);
                token = resultSegment.ContinuationToken;

                foreach (WordCloudRecord entity in resultSegment.Results)
                    list.Add(entity);
            } while (token != null);
            return list;
        }

        // other views and methods ...
    }
}
</code></pre>
<h3>Example View Page: ShowClouds.cshtml</h3>
<pre class="language-csharp"><code>@using Project.Models;

@{
    ViewData["Title"] = "Show Tag and Category Clouds";
}
&lt;h1&gt;@ViewData["Title"]&lt;/h1&gt;

@{
    double minFontSize = 8;
    double maxFontSize = 22;
    List&lt;WordCloudRecord&gt; tagCloudRecords = new List&lt;WordCloudRecord&gt;();
    double largestFrequency = 1;
    double lowestFrequency = 1;
    if (ViewBag.tagCloudRecords != null)
    {
        tagCloudRecords = ViewBag.tagCloudRecords;
        largestFrequency = (from i in tagCloudRecords
                            select i.frequency).Max();
        lowestFrequency = (from i in tagCloudRecords
                           select i.frequency).Min();
    }
    List&lt;WordCloudRecord&gt; categoryCloudRecords = new List&lt;WordCloudRecord&gt;();
    double largestFrequency2 = 1;
    double lowestFrequency2 = 1;
    if (ViewBag.categoryCloudRecords != null)
    {
        categoryCloudRecords = ViewBag.categoryCloudRecords;
        largestFrequency2 = (from i in categoryCloudRecords
                             select i.frequency).Max();
        lowestFrequency2 = (from i in categoryCloudRecords
                            select i.frequency).Min();
    }
}

&lt;div class="container mt-3"&gt;
    &lt;h2&gt;
        Category cloud
    &lt;/h2&gt;
    &lt;div class="media border p-3"&gt;
        &lt;div class="media-body"&gt;
            @foreach (var item in categoryCloudRecords)
            {
                var fontSize = minFontSize;
                if (largestFrequency2 != lowestFrequency2)
                {
                    fontSize = minFontSize + (item.frequency - lowestFrequency2) / (largestFrequency2 - lowestFrequency2) * (maxFontSize - minFontSize);
                }
                string fontSizeAsString = fontSize + "pt;";
                &lt;a href="/blog/category/@Uri.EscapeDataString(item.slug)" style="font-size:@fontSizeAsString"&gt;@item.RowKey&lt;/a&gt;
            }
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class="container mt-3"&gt;
    &lt;h2&gt;
        Tag cloud
    &lt;/h2&gt;
    &lt;div class="media border p-3"&gt;
        &lt;div class="media-body"&gt;
            @foreach (var item in tagCloudRecords)
            {
                var fontSize = minFontSize;
                if (largestFrequency != lowestFrequency)
                {
                    fontSize = minFontSize + (item.frequency - lowestFrequency) / (largestFrequency - lowestFrequency) * (maxFontSize - minFontSize);
                }
                string fontSizeAsString = fontSize + "pt;";
                &lt;a href="/blog/tag/@Uri.EscapeDataString(item.slug)" style="font-size:@fontSizeAsString"&gt;@item.RowKey&lt;/a&gt;
            }
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<h3>The results</h3>
<p>And this is what the clouds look like in a sidebar:</p>
<p><img src="https://cdn.buttercms.com/BQ60OhGR820HsLpyT7gS" alt="ButterCMSWordCloudsShownInSidebar.jpg" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>]]></content:encoded></item><item><title>Microsoft .NET 4.8 available since 18 April 2019</title><link>https://pjlee.net/blog/microsoft-net-48-available-since-18-april-2019</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Fri, 03 May 2019 06:52:00 +0000</pubDate><guid>https://pjlee.net/blog/microsoft-net-48-available-since-18-april-2019</guid><description>It doesn't come up as an option in the current latest release version of Visual Studio 2019 (v 16.0.3), but ,NET 4.8 (as opposed to 4.72) has apparently been available since 18 April 2019. See https://docs.microsoft.com/en-us/dotnet/framework/whats-new/index#v48 . From that page: NET Framework 4.8 builds on previous versions of the .NET ...</description><content:encoded><![CDATA[<p>It doesn't come up as an option in the current latest release version of Visual Studio 2019 (v 16.0.3), but ,NET 4.8 (as opposed to 4.72) has apparently been available since 18 April 2019.&nbsp; See&nbsp;<a href="https://docs.microsoft.com/en-us/dotnet/framework/whats-new/index#v48">https://docs.microsoft.com/en-us/dotnet/framework/whats-new/index#v48</a>.</p>
<p>From that page:</p>
<blockquote>
<p><span>NET Framework 4.8 builds on previous versions of the .NET Framework 4.x by adding many new fixes and several new features while remaining a very stable product.</span></p>
</blockquote>]]></content:encoded></item><item><title>Telerik have released Telerik UI for Blazor 1.0</title><link>https://pjlee.net/blog/telerik-have-released-telerik-ui-for-blazor-10</link><media:content medium="image" url="https://cdn.buttercms.com/iinSAlYTTmPW6TXqMdBg" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 02 May 2019 22:13:00 +0000</pubDate><guid>https://pjlee.net/blog/telerik-have-released-telerik-ui-for-blazor-10</guid><description>Further to my previous post which used the Preview version of Telerik's UI (user interface components) for Blazor, earlier today they released the first live version of it: see their blog post . I look forward to using this soon.</description><content:encoded><![CDATA[<p>Further to my<a href="https://pjlee.net/blog/an-experiment-setting-up-a-blazor-website-with-telerik-ui-components-a-blog-via-buttercms-and-commen"> previous post</a> which used the Preview version of Telerik's UI (user interface components) for Blazor, earlier today they released the first live version of it: see their <a href="https://www.telerik.com/blogs/introducing-telerik-ui-for-blazor-1-0-0">blog post</a>.</p>
<p>I look forward to using this soon.</p>
<p></p>]]></content:encoded></item><item><title>Maths silent failure problems (treatment of divide by zero, log 0 etc) are also present in .NET Core 3 Preview</title><link>https://pjlee.net/blog/maths-problems-treatment-of-divide-by-zero-log-0-etc-are-also-present-in-net-core-3-preview</link><media:content medium="image" url="" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Thu, 02 May 2019 20:44:00 +0000</pubDate><guid>https://pjlee.net/blog/maths-problems-treatment-of-divide-by-zero-log-0-etc-are-also-present-in-net-core-3-preview</guid><description>Further to this post , the exact same behaviour (as for .NET Core 2.2) is observed in .NET Core 3 Preview.</description><content:encoded><![CDATA[<p>I've just tested this using Visual Studio 2019 Preview (v 16.1 Preview 2).&nbsp; Further to <a href="https://pjlee.net/blog/some-maths-problems-from-net-472-and-earlier-are-still-present-in-net-core-22">this post</a>, the exact same behaviour (as for .NET Core 2.2) is observed in .NET Core 3 Preview, where by default, instead of the code stopping on a maths error like divide by zero, or log of 0, it just continues.</p>]]></content:encoded></item><item><title>Some maths problems from .NET 4.72 and earlier are still present in .NET Core 2.2, also Dictionary problem in .NET 4.72</title><link>https://pjlee.net/blog/some-maths-problems-from-net-472-and-earlier-are-still-present-in-net-core-22</link><media:content medium="image" url="https://cdn.buttercms.com/W5tZu3hRGC7yR1dg4DXQ" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Wed, 01 May 2019 07:59:00 +0000</pubDate><guid>https://pjlee.net/blog/some-maths-problems-from-net-472-and-earlier-are-still-present-in-net-core-22</guid><description>For many years, I and colleagues have been aware that the treatment of maths in .NET (and even before that in C++) can lead to code FAILING SILENTLY. That is: the code stops working normally, but instead of stopping and letting the user know that there is a problem, it ...</description><content:encoded><![CDATA[<h2>Silent failures from some common maths operations in .NET Core 2.2 (and earlier), and .NET 4.72 (and earlier)</h2>
<p class="text-danger">For many years, I and colleagues have been aware that the treatment of maths in .NET (and even before that in C++) can lead to code failing silently.</p>
<p>That is: the code stops working normally, but instead of stopping and letting the user know that there is a problem, it continues running, but with incorrect (or at least unexpected) output.</p>
<p>This happens with several things including divide by zero (where the code returns infinity and continues running) and log of zero or a negative number (where the code returns NaN, not a number, and continues running).</p>
<p>The work around has been to be aware of these problems and use custom functions to detect the problem and report it as soon as it occurs.</p>
<p>If you (or your developers) don't do that, then your code could well be failing silently, which is bad because your output may be incorrect, and:</p>
<ol>
<li>You or your customers may not notice it, and</li>
<li>Even if you notice it, you will have to step through your code to find the (possibly many) places where the problem occurs.</li>
</ol>
<p>I had noticed that .NET Core 2.2 (and 2.1, and possibly earlier versions too) had fixed a problem with .NET 4.72 and earlier's Dictionary class, and had hoped that along with that fix, .NET Core would have also fixed the above maths problems.&nbsp;</p>
<p>But on investigation, this does not seem to be the case.</p>
<p>I have published a short code repository on GitHub to show this - see <a href="https://github.com/patrickjlee/core-comparison" title="core-comparison pjlee code repository">here</a>.</p>
<h2>A problem with the Dictionary in .NET 4.72 and earlier</h2>
<p>(For non technical readers, a Dictionary is a collection of key, value pairs, where the keys have to be unique.)</p>
<p>The Dictionary problem in .NET 4.72 and earlier is that if you ask for a value in the Dictionary corresponding to a key that doesn't exist (e.g. 2), then instead of telling you the useful information (e.g. "You asked for a value for key 2, which doesn't exist in the dictionary"), .NET 4.72 and earlier misses out the important information. It just says "The given key was not present in the dictionary".</p>
<p><img src="https://cdn.buttercms.com/WAggW1iSS5iS9MRgPl5r" alt="MathAndDictionaryProblemsInDotNet4.72..." style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p></p>
<p>See the repository for the full code, but a screenshot of the relevant code for .NET Core 2.2 Console App project is:</p>
<p><img src="https://cdn.buttercms.com/MkufRVzPQYyZJtNyOXeY" alt="CodeScreenshotMathProblemsStillPresen..." style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p>Other developers: I'd be interested to hear of your reactions to this (maybe I'm missing something and it isn't a problem, but at the moment I don't think so), and other ways of addressing the issues.</p>
<p></p>]]></content:encoded></item><item><title>Let your users ask “What’s my next step?” – a very useful AI addition to your apps</title><link>https://pjlee.net/blog/let-your-users-ask-whats-my-next-step-a-very-useful-ai-addition-to-your-apps</link><media:content medium="image" url="https://cdn.buttercms.com/oowVRkqDRMSqIQZ3i3FY" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 30 Apr 2019 09:24:00 +0000</pubDate><guid>https://pjlee.net/blog/let-your-users-ask-whats-my-next-step-a-very-useful-ai-addition-to-your-apps</guid><description>One example of how #AI can make it easier for your staff, customers or suppliers to interact with your software tools is to add a combined ”Next Step / Tell me what you want to do” facility. This ...</description><content:encoded><![CDATA[<p><em>(This is taken from work I have done on InQA's WebPocketMoney website, using Microsoft's LUIS, Language Understanding Intelligent Services).</em></p>
<p>One example of how #AI can make it easier for your staff, customers or suppliers to interact with your software tools is to add a combined<strong>&rdquo;Next Step / Tell me what you want to do&rdquo;</strong> facility.</p>
<p>This uses <strong>natural language processing (NLP)</strong> combined with knowledge of who the user is (and what their role is, e.g. whether they are a member of staff, a customer, or a supplier, or a user with admin rights for example) and the context (which page or part of the app they are on, and what data they have stored in the system), to add two powerful new ways for the user to interact (with minimal training) with the app:</p>
<h2>What&rsquo;s my next step?</h2>
<p>On any page, simply clicking the Go button asks the system &ldquo;What&rsquo;s my next step?&rdquo;. The system then look intelligently at the user&rsquo;s identity, role, data and location within the app and makes one or more suggestions as to what the user could usefully do next to make the most of the app.</p>
<p>For a couple of examples, please see <a href="https://inqa.com/2018/02/05/webpocketmoney-com-an-easy-way-to-track-your-childrens-pocket-money-balances-online-with-a-natural-tell-me-user-interface/">here</a>.</p>]]></content:encoded></item><item><title>Microsoft Professional Program for Data Science: my journey (May 2017 – April 2018)</title><link>https://pjlee.net/blog/microsoft-professional-program-for-data-science-my-journey-may-2017-april-2018</link><media:content medium="image" url="https://cdn.buttercms.com/0IirirJCSe6xDnlHWqtk" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 30 Apr 2019 09:12:00 +0000</pubDate><guid>https://pjlee.net/blog/microsoft-professional-program-for-data-science-my-journey-may-2017-april-2018</guid><description>I wrote this exactly a year ago - since then I have completed the Microsoft Professional Program for Big Data, again working in my spare time. I am delighted to have now completed the Microsoft Professional Program for Data Science. It has been 10 online courses (taking a total of ...</description><content:encoded><![CDATA[<p>I wrote this exactly a year ago - since then I have completed the Microsoft Professional Program for Big Data, again working in my spare time.</p>
<p>I am delighted to have now completed the Microsoft Professional Program for Data Science. It has been 10 online courses (taking a total of 322 hours) over just more than 11 months and my average (mean) mark over the 10 courses was 96.6%. The final course was a capstone project which involved analysing data from the 2015 earthquake in Nepal, building a model to help predict the degree of damage to buildings (amongst other things to help emergency response teams prioritise rescue efforts) and producing a report on this. This was an extremely practical way to complete the course.</p>
<p>I have created a series of slides (collected together in a Microsoft Sway online document) showing the main stages of my journey.&nbsp; This should give you a pretty good flavour of the sort of work required on the course (and I hope will help people contemplating doing this or a similar course - I wish you the very best in your own data science journey!).</p>
<p>You can see the slides at<span>&nbsp;</span><a href="https://sway.com/lsUjwGITuGFpsHIM?ref=Link" target="_blank" rel="noopener">https://sway.com/lsUjwGITuGFpsHIM?ref=Link</a></p>]]></content:encoded></item><item><title>My software portfolio</title><link>https://pjlee.net/blog/my-software-portfolio</link><media:content medium="image" url="https://cdn.buttercms.com/GTiuMDoeSOO1gAUmE6N1" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 30 Apr 2019 08:10:00 +0000</pubDate><guid>https://pjlee.net/blog/my-software-portfolio</guid><description>Below is a slideshow of some of my software work. To see each individual picture in more detail, go to https://patrickjlee.smugmug.com/Software-engineering-portfolio/ .</description><content:encoded><![CDATA[<p>Below is a slideshow of some of my recent software work. To see each individual picture in more detail, go to <a href="https://patrickjlee.smugmug.com/Software-engineering-portfolio/">https://patrickjlee.smugmug.com/Software-engineering-portfolio/</a>.</p>
<p><iframe width="800" height="600" src="https://patrickjlee.smugmug.com/frame/slideshow?key=bjvrVX&amp;autoStart=1&amp;captions=0&amp;navigation=0&amp;playButton=0&amp;randomize=0&amp;speed=3&amp;transition=fade&amp;transitionSpeed=2" frameborder="no" scrolling="no"></iframe></p>]]></content:encoded></item><item><title>My technology certifications</title><link>https://pjlee.net/blog/my-technology-certifications</link><media:content medium="image" url="https://cdn.buttercms.com/WQyCku6zTtqghBJAV4DG" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Tue, 30 Apr 2019 07:49:00 +0000</pubDate><guid>https://pjlee.net/blog/my-technology-certifications</guid><description>Below is a slideshow of my software certifications. To see each individual certification in more detail, go to https://patrickjlee.smugmug.com/Technology/Certifications/ .</description><content:encoded><![CDATA[<p>Below is a slideshow of my software certifications. To see each individual certification in more detail, go to <a href="https://patrickjlee.smugmug.com/Technology/Certifications/">https://patrickjlee.smugmug.com/Technology/Certifications/</a>.</p>
<p>I have completed Microsoft's Professional Programs for both Data Science and Big Data, and I expect to complete their Professional Program for AI (Artificial Intelligence) in July 2019.</p>
<p></p>
<p><iframe width="800" height="600" src="https://patrickjlee.smugmug.com/frame/slideshow?key=TVTtjJ&amp;autoStart=1&amp;captions=0&amp;navigation=0&amp;playButton=0&amp;randomize=0&amp;speed=3&amp;transition=fade&amp;transitionSpeed=2" frameborder="no" scrolling="no"></iframe></p>]]></content:encoded></item><item><title>Valuing large pension plans more quickly and cost effectively using Azure Functions (Part 1)</title><link>https://pjlee.net/blog/experiments-using-azure-functions-v-2-repeatedly-and-with-multiple-queues-part-1</link><media:content medium="image" url="https://cdn.buttercms.com/oYBbKd1lTt6qWAHcPDSe" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 29 Apr 2019 15:59:00 +0000</pubDate><guid>https://pjlee.net/blog/experiments-using-azure-functions-v-2-repeatedly-and-with-multiple-queues-part-1</guid><description>Using different Microsoft cloud techniques to perform a financial valuation of large numbers (100,000 or even several million) of UK defined benefit pension plan members via cashflow projections as quickly as possible, but without incurring unnecessary cost.</description><content:encoded><![CDATA[<p>I love the idea behind "serverless" computing, including Azure Functions which is perhaps Microsoft's main offering in this area.&nbsp; Of course it is not really serverless, because servers (virtual machines) are still being used in the background, but without you having to manage them: Microsoft do all that for you behind the scenes.</p>
<p>The particular problem that I have been using Azure Functions to address is an #actuarial #BigData #pensions one:</p>
<p>how to perform a financial valuation of large numbers (100,000 or even several million) of UK defined benefit pension plan members via cashflow projections as quickly as possible, but without incurring unnecessary cost .</p>
<p>When done accurately and before any clever processing, the number of cashflows produced can easily run into the <strong>millions</strong>, and for a large pension plan, into the <strong>billions</strong>. (When I have time, I plan to explain why, and talk about some of the clever processing that can be done).</p>
<p>This situation is one that obviously calls for parallel or distributed processing, with the work shared out between many machines.</p>
<p>The traditional (non serverless) way is to simply spin up as many machines as you like (e.g. I have done this with more than 150 cores), split the work amongst them and keep reallocating any remaining work amongst the machines until all the work has been done.&nbsp; That can be done using Microsoft technology using #AzureBatch.&nbsp; But it is also the most expensive way to do things, because all the machines are dedicated to your work until it is all completed. So naturally you pay for the number of cores times the time taken.</p>
<p>So, given that it takes some time for the machines to be ready for work, this is the pattern to be expected Azure Batch (caveat: I am extrapolating from my experience over larger workloads taking closer to 2 hours than here about 7 to 8 minutes, so have made a note to test Azure Batch over this smaller period):</p>
<p><img src="https://cdn.buttercms.com/HnYjfr3tRfi22Fyd4XTJ" alt="AzureBatchExpectedPatternOfNumberOfIn..." style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p>It takes a couple of minutes for the instances to all become ready for use (but since they all started being warmed up from cold at the same time, there is little variation in the time to warm for them), then the machines are all fully occupied as the work gets allocated evenly to them, then (probably because of a little random variation in the speed each machine takes - perhaps dependent on relative health, e.g. out of 150 some may perform slightly worse than others) the bulk of the work gets done with a few stragglers taking slightly longer.</p>
<p>The serverless way is to use something like Azure functions, in which case one way of doing things (the way that I have used) is to split the work into small chunks and send lots of messages to an Azure queue, each one containing the instructions for a particular chunk of work.&nbsp;&nbsp;</p>
<p>In theory what should then happen is that Microsoft Azure will realise that the queue is getting lots of messages, and start spinning up an increasing number of machines ("instances") to do the work, and keep doing this until all the messages in the queue have been dealt with.&nbsp;&nbsp;</p>
<p>Of course, there is no guarantee that Azure will keep increasing the number of instances until the work is done. Instead, as I understand it, Azure uses an algorithm to determine how many instances are needed, and after increasing the instances for a while, may actually start decreasing them if the algorithm deems that the queue is going down satisfactorily enough.&nbsp; (I have not been able to find out how the algorithm works, but it is said to take into account not only the rate of increase/or decrease of messages in the queue, but also the age of the oldest message in it.&nbsp; This is further complicated by the fact that some messages - for reasons that are hard to find out - seem to fail to be processed at first, and are then hidden from the queue for several minutes, before becoming visible again in which case they might be processed.&nbsp; As I will demonstrate, while this only seems to affect a small percentage of messages, it can delay the time until all the work is complete quite significantly.</p>
<p>I&nbsp; have recently carried out some 91 different timed runs using Azure Functions under a variety of circumstances, e.g. in some I used Azure functions version 1, in some version 2. I also varied the number of queues (sometimes allocating all the work to 1 queue, sometimes to 2 queues, so that 2 different functions are performing the work, and in some to 5 queues.&nbsp; In some of the runs with 2 or 5 queues I applied a form of load balancing (by moving messages from the slowest queues to the fastest ones), in others I did not.</p>
<p>I also repeated the same run over and over again, in order to test how repeatable runs using Azure functions are.&nbsp;&nbsp;</p>
<p>I found that the answer (both in terms of the number of instances doing the work, and in terms of the total time taken to complete the work) sometimes varies quite a lot.</p>
<p>In all my runs, the task was the same: for each of 1000 queue messages, the Azure function processing it had to wait for 65 seconds and then it could return and report successful completion.</p>
<p>Here is an example of a situation when there was a reasonable degree of repeatability in terms of total time taken (although not in terms of how many instances performed the work): my runs 48 to 57 were a deliberate repeat of run 45, in which the work was allocated to 5 different queues, so equally to 5 different Azure version 2 functions, each with 200 messages to process.</p>
<p>Out of 11 runs (including run 45), the total time taken was pretty close across 10 of the runs, apart from one (run 53), where the work took considerably longer to complete:</p>
<p><img src="https://cdn.buttercms.com/gPNbR3VqSsmU52ssPVSH" alt="Azurev2FunctionsVariabilityInTimeTake..." style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p></p>
<p>NB the technologies I used in these runs&nbsp; were Azure Queues, Azure Functions, Power BI, SQLServer (on completion of processing a message, each function logged its start time and end time and the identifier of the message to a separate queue, and a different type of azure function then saved that to a SQL Azure database, which was then processed by a web app to produce the type of chart above.&nbsp; In addition, I used Power BI to check the approximate number of messages in each queue to monitor how quickly each queue was being dealt with.</p>
<p>More on this (and what exactly was happening in run 53?) in Part 2, which I hope to write in a few weeks time.</p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>]]></content:encoded></item><item><title>This site is currently written using ASP.NET Core 2.2</title><link>https://pjlee.net/blog/this-site-is-currently-written-using-aspnet-core-22</link><media:content medium="image" url="https://cdn.buttercms.com/XOx60JzMTDe8xW89NWaP" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 29 Apr 2019 15:44:00 +0000</pubDate><guid>https://pjlee.net/blog/this-site-is-currently-written-using-aspnet-core-22</guid><description>I had wanted to use Blazor for this site, but because of problems getting Bootstrap 4 formatting to work I reverted to ASP.NET Core 2.2.</description><content:encoded><![CDATA[<p>I had intended to write this site using Blazor and ASP.NET Core 3.0&nbsp; but given that I experienced formatting problems with Bootstrap 4 markup, and since I also couldn't get some of the Telerik UI components to work (perhaps not surprising since Blazor, ASP.NET Core 3 and the Telerik components are all in Preview) I decided to stick with ASP.NET Core 2.2 for the time being.</p>]]></content:encoded></item><item><title>An experiment setting up a Blazor website with Telerik UI components, a ButterCMS blog and Disqus comments</title><link>https://pjlee.net/blog/an-experiment-setting-up-a-blazor-website-with-telerik-ui-components-a-blog-via-buttercms-and-commen</link><media:content medium="image" url="https://cdn.buttercms.com/iinSAlYTTmPW6TXqMdBg" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 29 Apr 2019 06:32:00 +0000</pubDate><guid>https://pjlee.net/blog/an-experiment-setting-up-a-blazor-website-with-telerik-ui-components-a-blog-via-buttercms-and-commen</guid><description>Successful experiments setting up a Blazor website with Telerik UI Grid and Tab Strip components, also integrated with a blog via ButterCMS and comments via Disqus. Some problems not yet resolved (e.g. bootstrap 4 styling not working properly, need to investigate). But Blazor looks very promising!</description><content:encoded><![CDATA[<h2>Developing web apps with little (perhaps no) Javascript?</h2>
<p>Microsoft's new <a href="https://blazor.net" title="Blazor website">Blazor</a> technology is extremely interesting, because it offers the possibility of writing web apps using little or no Javascript.&nbsp;&nbsp;</p>
<p>Until now, most websites typically require code to be written in at least two languages: Javascript for the client (browser) side, and C# (my preference, but others may prefer php, python, C++, VB.net, or other languages) for the server side.</p>
<p>That not only increases the learning curve, but also adds extra work when communicating between the server and the browser (e.g. dates have very different formats in Javascript and C#).&nbsp;&nbsp;</p>
<p>So Blazor which is still only in Preview mode (like <a href="https://dotnet.microsoft.com/download/dotnet-core/3.0">ASP.NET Core 3.0</a> and <a href="https://visualstudio.microsoft.com/vs/preview/">Visual Studio&nbsp; 2019 v 16.1 Preview 2</a> which are needed for it) looks as if it might significantly reduce the learning curve and pain of developing complex web apps.</p>
<p>The basic Blazor site available from Visual Studio 2019 v 16.1 Preview 2 comes with 2 small examples of interactivity that would normally be done using some javascript: updating a counter via clicking a button, and displaying data (retrieved from the server) in a table.&nbsp;</p>
<h2>Using Blazor for a more complex example: a blog with commenting allowed</h2>
<p>As an experiment, I decided to try using Blazor for some something closer to a real world application and in the process to try out <a href="https://www.telerik.com/blazor-ui">Telerik's new user interface components for Blazor</a> (also in Preview, which of course makes sense because Blazor may change quite a bit before it is released).&nbsp;</p>
<p>I wanted to try setting up a Blazor website that could be used not only for standard pages (of the sort in Microsoft's Blazor template), but that could also be used for blogging. For this purpose, I decided to try using a headless blog (i.e. one without a user interface), specifically <a>ButterCMS</a>.</p>
<p>I also wanted any visitors to be able to interact with the blog by leaving comments, so I decided to try using <a href="https://disqus.com">Disqus</a> (one of the tools that ButterCMS recommend , since ButterCMS doesn't provide a commenting facility itself).</p>
<p>After a few gotchas (not surprising since all the products are in preview), I got things to work reasonably well.</p>
<p>For example, here is the Telerik TabStrip for Blazer in operation after clicking the dropdown list to tell it to put the tabs on the left:</p>
<p><img src="https://cdn.buttercms.com/eV6Di6RRSfNt8EeTxlmh" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p>and here is the Blazor template project's Fetch Data page amended to use the Telerik Grid for Blazor (I increased the number of records from 5 to 8 to showcase the grid's paging ability, and note that the Fahrenheit temperature column should be removed as the template project is not setting it&nbsp; - it is zero in all cases):</p>
<p><img src="https://cdn.buttercms.com/4jhXE4SGRK6lqqamzqzP" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p></p>
<h2>Integrating with ButterCMS</h2>
<p>ButterCMS provide <a href="/docs/api-client/dotnet#Blogging">helpful examples</a> of how to call their&nbsp; &lt;abbr title="Application Programming Interface"&gt;API&lt;/abbr&gt; in an ASP.Net MVC web app, and it only needed a few alterations to get this to work with Blazer's Razor pages.</p>
<p>Integrating with Disqus was a bit more difficult, because for the first time I had to resort to using Javascript, because that is how Disqus integrates with websites at the moment. (Maybe they'll write an API that can be called directly from Blazer C# code in future).&nbsp; And that required using Interop between Blazer and Javascript.&nbsp; But after some experiments and some very quick and useful help from Microsoft's <a href="https://www.linkedin.com/in/lukeglatham/">Luke Latham</a> (many thanks, Luke!) I got that working too:</p>
<p></p>
<p><img src="https://cdn.buttercms.com/VSlm4mQMRTG3PCvKptk8" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" /></p>
<p><a name="problems"></a></p>
<h2>A few problems (not surprisingly since all the technology is still in preview):</h2>
<p>I did notice that if anything went wrong (e.g. i'd put a typo in the javascript - something that is much easier to do than in C# where Visual Studio is much more likely to pick it up before run time), then the Blazer navigation seemed to stop working.&nbsp;</p>
<p>More significant is that so far I have been unable to get Bootstrap 4 styling to work properly in the Blazer project.&nbsp; At first I thought this might be because I had had to change the css and js files from the Blazer default project ones to the ones needed by the Telerik UI components for Blazer.&nbsp; But even after reverting to the default Blazer project ones, some basic things like getting navigation buttons/links to line up properly:</p>
<p><img src="https://cdn.buttercms.com/b7amlrYdQFeszZMtwfKj" alt="undefined" style="display: block; margin-left: auto; margin-right: auto;" />&nbsp;</p>
<h2>Some of the gotchas I encountered</h2>
<p>When publishing to Azure, I needed to add the ASP NET Core 3.0 runtime extension to the app service to avoid an error (see my comment <a href="https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/blazor/server-side?view=aspnetcore-3.0#feedback">here</a> on docs.microsoft.com).&nbsp;</p>
<p>With regard to getting the javascript interop to work with Disqus, please the conversation <a href="https://github.com/aspnet/AspNetCore.Docs/issues/12188">here</a> with Microsoft's very helpful Luke Latham.</p>
<h2>Conclusion</h2>
<p>I really like Blazor so far, and was very pleasantly surprised that it is already possible to produce quite a complex site (particularly the integration with ButterCMS and Disqus) already, while it is still in Preview.&nbsp; I need to look into why the Bootstrap 4 formatting isn't working properly though.&nbsp; When I have time (which I hope will be in a few weeks) I would definitely like to return to this!</p>]]></content:encoded></item><item><title>Contact</title><link>https://pjlee.net/blog/contact</link><media:content medium="image" url="https://cdn.buttercms.com/wolbC1NOTjGx2YM09Bk5" /><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Patrick Lee</dc:creator><pubDate>Mon, 29 Apr 2019 04:11:00 +0000</pubDate><guid>https://pjlee.net/blog/contact</guid><description>Contact details for Patrick J Lee</description><content:encoded><![CDATA[<p>You can reach me on <a href="https://www.linkedin.com/in/patrick-lee-data-ai-software/" title="Patrick Lee linked in profile">Linked In</a> or via email: <a href="mailto:patrick.lee@inqa.com" title="Patrick Lee email">patrick.lee@inqa.com</a>.</p>]]></content:encoded></item></channel></rss>