Yesterday, Andrew Lo spent some time on a nice graph, discussing attitudes towards risk. Here are four assets (thanks
@TCJUK for improving the terminology), real data (no information here about time, but it’s the same scale for the four of them)
The question raised was quite simple
if you could invest in one, and only one, asset which one will you pick ?
I will be in London, UK, at the Centre for Central Banking Studies, invited as a keynote speaker for a major conference. For my talk, on Econometric Models and Statistical Learning Techniques, the agenda is the follownig
In two weeks, I will be invited as a keynote speaker in London, to give a talk on what can central bank policymakers learn from other disciplines. Which is an interesting question. Initially, I wanted to give a talk on actuarial science, large risks, and connexion with finance, but I will finally give a talk on connexions between Econometrics and Machine Learning, and how we can – as Econometricans – actually learn a lot from people coming from the Statistical Learning community – in the spirit of Varian (2013). I will upload the slides within the next ten days….
Before coming back in France, I will spend a (long) week-end in London !
Following my previous post, François (aka @FrancoisKeck) posted a comment mentionning another package I could use to get an interactive map, the rleafmap package. And the heatmap was here easy to include.
The first part is still the same, to get the data,
> require(rleafmap) > library(sp) > library(rgdal) > library(maptools) > library(KernSmooth) > setwd("/home/arthur/Documents/") > deaths <- readShapePoints("Cholera_Deaths") > df_deaths <- data.frame(deaths@coords) > coordinates(df_deaths)=~coords.x1+coords.x2 > proj4string(df_deaths)=CRS("+init=epsg:27700") > df_deaths = spTransform(df_deaths,CRS("+proj=longlat +datum=WGS84")) > df=data.frame(df_deaths@coords)
To get a first visualisation, use
> stamen_bm <- basemap("stamen.toner") > j_snow <- spLayer(df_deaths, stroke = FALSE) > writeMap(stamen_bm, j_snow, width = 1000, height = 750, setView = c( mean(df[,1]),mean(df[,2])), setZoom = 14)
and again, using the + and the – in the top left area, we can zoom in, or out. Or we can do it manually,
> writeMap(stamen_bm, j_snow, width = 1000, height = 750, setView = c( mean(df[,1]),mean(df[,2])), setZoom = 16)
To get the heatmap, use
> library(spatstat) > library(maptools) > win <- owin(xrange = bbox(df_deaths)[1,] + c(-0.01,0.01), yrange = bbox(df_deaths)[2,] + c(-0.01,0.01)) > df_deaths_ppp <- ppp(coordinates(df_deaths)[,1], coordinates(df_deaths)[,2], window = win) > > df_deaths_ppp_d <- density.ppp(df_deaths_ppp, sigma = min(bw.ucv(df[,1]),bw.ucv(df[,2]))) > df_deaths_d <- as.SpatialGridDataFrame.im(df_deaths_ppp_d) > df_deaths_d$v[df_deaths_d$v < 10^3] <- NA > stamen_bm <- basemap("stamen.toner") > mapquest_bm <- basemap("mapquest.map") > j_snow <- spLayer(df_deaths, stroke = FALSE) > df_deaths_den <- spLayer(df_deaths_d, layer = "v", cells.alpha = seq(0.1, 0.8, length.out = 12)) > my_ui <- ui(layers = "topright") > writeMap(stamen_bm, mapquest_bm, j_snow, df_deaths_den, width = 1000, height = 750, interface = my_ui, setView = c( mean(df[,1]),mean(df[,2])), setZoom = 16)
The amazing thing here are the options in the top right corner. For instance, we can remove some layers, e.g. to remove the points
or to change the background
To get an html file, instead of a standard visualisation in RStudio, use
> writeMap(stamen_bm, mapquest_bm, j_snow, df_deaths_den, width = 450, height = 350, interface = my_ui, setView = c( mean(df[,1]),mean(df[,2])), setZoom = 16, directView ="browser")
which will generate the html table (as well as some additional files actually) above. Awesome, isn’t it?
Monday, we really had a great conference in London.
It was a great pleasure since I did learn a lot of things. And also a great honor to be the last speaker. Tuesday morning, I wanted to go to Thomas Bayes’grave, which is the the graveyard next to the CASS Business School. I had a good a apriori about where the grave should be,
but to be honest, it was not possible to get close enough to be able to read the name on it (even if I now know that it is the large one in the right lower corner of the picture)
Actually, on the internet, you can find some picture where the stone is clean, so you can learn that the grave is the “cotton” one – at least, you can easily read that name.
It was actualy more simple to see William Blake’s grave, as well as Daniel Defoe’s.
Then, with Leo, we’ve been to the Lloyd’s to see some friends, as well as Richard Rogers’s building.
At the 11th floor, you have a lot of rooms for meetings, as well as old paintings, to tell a bit more about the history of the company,
The building is just amazing. Unfortunately, to get in, there is a dress code. A sort of strict one actually. Leo is working for RBC, so he casually wears a suit. But I don’t. I mean, I did have a shirt, but as someone mentioned, “there is no collar !” (I don’t want to put my friend into trouble for helping me getting in).
So, after going throught the basement, we’ve been able to reach the elevator, and go on top.
The building is not exactly located where Edward Lloyd got his coffee shop (even after moving at the end of 1691 on Lombard street), but the Lloyd’s is still a legend for anyone interested in the history of insurance, and more generally, the history of risk modeling (and management).
I will flight this Saturday, to be at the R in Insurance conference that will start this Monday. But before, Markus suggested that we go for a beer on Sunday evening ! That is, indeed, a terrific idea !
Then I will spend some time in Europe… and yes, I will take a break !
Monday, I will be giving the closing talk of the R in Insurance Conference, in London, on Bayesian Computations for Actuaries, as to be more specific, Getting into Bayesian Wizardry… (with the eyes of a muggle actuary). The animated version of the slides (since we will spend some time on MCMC algorithm, I thought that animated graphs could be more informative) can be downloaded from here.
Those slides are based on the chapter writen with Ben Escoto for the Computational Actuarial Science with R book, and some previous work.