Ideas for June 2020

A noticeable artefact from the transmissive material

Final Update

Turns out I am enjoying playing around with Blender again. I didn’t work on any of my initial planned mini-projects beyond some further thoughts on a .csv parser. Perhaps I archive these for another day. I’ve also been busy at work learning T#, the proprietary programming language used in Tyche by RPC.

Update

So I’ve been distracted over the last weekend of May with Blender again. The feature image was created using Blender’s sculpting workflow and some nice shading techniques to create the sclera cornea and iris. I’ll be adding some more Blender renders over this month. This has taken up much more time than anticipated so I’m currently putting on hold the below development work.

Summary of ideas

Working on a few things … thought about what development1 I could work on next:

  1. A .csv parser
  2. A share option investment review web page, working title “Are we in the money?
  3. Some JavaScript to download all files from a selected SharePoint site

All output will be posted as an open source solution on GitHub with a MIT license (essentially attribution is required in your source code if you use it).2

The .csv parser

My idea is to perform some simple parsing checks on a potential .csv file that needs to meet a set criteria. Examples:

  • Date field - needs to be in the form yyyy-mm-dd, so:
    • 23/05/2020 as user entry by default would fail, and thus would be parsed as 2020-05-23, additionally
    • 43974 (which is Excel’s serial numeric representation3 of the date 23rd May 2020) would fail, and again be parsed as 2020-05-23
  • Location code field - needs to have a length of 5 characters, so:
    • LON00 is acceptable, even though the entry in the database is stored as LON, whereas
    • LON would fail and therefore would be parsed as LON00
  • Amount field - needs to be in the form xxxxxx.xx, i.e.:
    • £10.00 would fail due to the inclusion of a currency symbol character and therefore would be parsed as 10.00,
    • 1,234,567.00 would fail due to the inclusion of a comma separating the thousands and therefore would be parsed as 1234567.00,
    • 1000 would fail due to the omission of the two decimal points and therefore would be parsed as 1000.00,
    • 1.000,55 would fail due to the usage of European numeric format (decimals are used as thousand separators, commas are used for decimal points) - this would be parsed as 1000.55

This idea would alleviate the onerous requirement on the end user to match an arbitrary specification. Instead the code would transform the .csv into the required format for processing in another process or storage in a database.

💰 Are we in the money? 🤑

This will be a share saving scheme performance review web application which will show:

  • Current share price, $\mathbf{S}_{t}$
  • Strike price, $\mathbf{K}_{t=0}$
  • Grant date, $\mathbf{t}=0$
  • Vesting date, $\mathbf{T}$, giving days until vested of $\mathbf{T}-\mathbf{t}$
  • Are we in the money? Yes or no - simple function call Max$(0, \mathbf{S}_{t} - \mathbf{K})$
  • Absolute (£) and relative (%) return based on current share price
  • Annualised return based on time $t$ between the current date $t$ and grant date $0$
  • Outperformance versus broad index, perhaps FTSE 100 or S&P 500
  • Use some Brownian motion to predict the share price at time $\mathbf{T}$

Downloading all files from SharePoint using JavaScript

A simple (I hope) JavaScript file that will download all files from a selected SharePoint directory into a user-specified network directory.

What’s the need for this? The SharePoint site I use only allows a user to individually click on a file, click the context menu (to activate the drop down options), before finally being able to click on download. That’s three clicks on top of mouse cursor movement. Not too bad for one file, what about doing this for 100 files?

So this simple application will create some efficiency. Of course because I don’t know how to code JavaScript it will take me longer to write this than manually clicking and pointing 300 times ($3$ clicks x $100$ files).


  1. Feel free to interchange the word “development” with coding, programming, whatever term you want. ↩︎

  2. Please note this statement is not to be construed as legal advice and is strictly my interpretation (my opinion). Consult a legal expert for your own use case. As a short primer on this complex topic, I suggest visiting choose a license. ↩︎

  3. Look up Excel’s DATAVALUE function for more information on how Excel stores dates ↩︎

Avatar
Alex Garbiak
Reserving Actuary

I am a reserving actuary at Hiscox focusing on US lines. All views and opinions expressed are my own and do not reflect those of my employer.

Related