Friday, 13 March 2020

Laissez-faire economics won't save us from COVID-2050


A laissez-faire approach to coronavirus, no matter how much we get nudged - individual responsibility to wash our hands, avoid planes and public transport, and self-isolate - will not stop the spread of the virus. What the economy needs is not words, but a strong, fiscal response to supply the physical assets that we need to push this virus back. In those terms, the recent UK budget was not ambitious enough. 


I'm not talking about the supply of toilet rolls, sanitiser and pasta, I'm talking about spending on measures to restrict the spread of the virus. I don't know much about NHS Labs, but it appears they hit a supply side constraint because, despite scaling up and there being a 10-minute test available, the UK will "stop testing members of the public who display mild symptoms". The same is true of hospital beds, where UK hospitals rank amongst the lowest in Europe; on top of an NHS staff shortage and the closure of community hospitalsI know the evidence is mixed, but providing temperature checks at stations, ports, and airports could catch just over half of coronavirus-infected passengers


Specific supply side constraints are not solved by lowering general interest rates, but by strong and targetted fiscal policy. Yes, there has been some money for the NHS, but it has been constrained by ten years of austerity. From this weakened base, the cautious UK response could include more incentives for people to do the right thing and stay at home if they are sick, including the self-employed and low-waged. Given the low NHS base, the UK needs more stringent controls on the movement of people than our European and Asian neighbours, not less.


Where to start? As a climate activist, I would have no qualms about grounding flights for a few weeks.  Why not push harder on that net zero by 2050 door at the same time? After all, as my 13-yr old son joked last night, we don't yet know how bad the COVID-2050 strain will be. 


Indeed, our service industries depend upon the UK being a safe place to visit. Imagine if there was no yellow fever vaccine - with a fatality rate of about 5% - few people 'at risk' would travel to areas where yellow fever is endemic. Whether the case fatality rate for COVID-19 is similar or turns out to be less because of undiagnosed cases, there are around 1 billion 'at risk' over 60s today, forecast to double by 2050. Prepare for the worst, and hope for the best.


What does more stringent controls on movement mean? Ensure people can work from home for the same pay; cancel large gatherings and move to virtual events; use video calling in at risk settings, GP surgeries and care homes; offer online exams and tutorials at Universities; encourage less (and longer) overseas and other trips; help elderly neighbours get their groceries. These are familiar themes to climate activists - live locally and act globally.

Achieving net zero creates both supply and demand side problems, but the UK government should have few qualms about letting CO2-intensive companies fail under 'tooth and claw' capitalism if they are not going to meet those 2050 climate goals - this is not a time to spend £27bn on motorways and roads. Given the laisser-faire response of the UK and other governments it may be too late to hold back COVID-19. But it is not too late to plan for COVID-2050.

Thursday, 7 December 2017

Using Bloomberg From R and Excel


Bloomberg from R

First, you need to be logged on to Bloomberg.

If the Bloomberg/Excel add-in does not work, then:
1. Close Excel and/or R
2. Keep Bloomberg running
3. Go to Start-> Bloomberg -> API Environment Diagnostics
4. Click Start when the Bloomberg API Diagnostics window has loaded
5. If a “Login to wintrv…” message below then pops up, this occurs when Bloomberg isn’t open – it is highly recommended that you have Bloomberg running; you can proceed without it, but you may not be able to resolve some errors if you do so
6. Once the check is finished, you will get a 'Diagnostics completed' message
7. If the Repair button is available to press on the Bloomberg API Diagnostics window, it means it needs to run the repair and you should do so by clicking Repair (it should take a couple of minutes)
8. Once the check is done, and repair if necessary, the ideal state is all green ticks except for 2 yellow “!” for Dotnet Installation and Excel Throttle Interval only. Else, you can still run Excel or R-Studio and see if the Bloomberg-associated functionality is working.

# install the Bloomberg package, and connect
install.packages("Rblpapi")
library (Rblpapi)
blpConnect()

# get the Bloomberg data history for SPY US Equity - last 100 days - and plot it
x <-  bdh("SPY US Equity", "PX_LAST", start.date=Sys.Date()-100)
plot(x)

# find out what other fields are available for prices
res <- fieldSearch("price")
res

# get the Bloomberg data history for SPY US Equity - last 100 days - and plot it
x <-  bdh("SPY US Equity", "OPEN", start.date=Sys.Date()-100)
plot(x)

Bloomberg from Excel

As above, if the Bloomberg/Excel add-in does not work, then repair (Steps 1-8).
Open an Excel Sheet, and type the following into a cell:
Historical prices: BDH("F US Equity", "PX_LAST", “16/11/2000”, “15/11/2016”)
This will give you the last traded price (PX_LAST) for 'F US Equity (Ford Motor  Company) from 16/11/2000 to 15/11/2016. The first parameter must be the Bloomberg stock code.

For DMU students, this URL shows how to get data from Bloomberg into Excel.
Also for DMU students, this URL shows how to use Bloomberg.