Delta and Gamma using the Achilles trick

In a previous post on the Achilles trick we developed a specific formula – here we show one example usage of that formula that allows us to quickly and easily derive closed form formulas to approximate the delta and gamma of a vanilla call or put option from the GK equations. Some definitions We begin with a…

Basic VBA 10: Debugging and refactoring

Debugging is an extremely important part of coding and one that is often overlooked.  A good programmer often spends just as much time debugging and checking code as actually building new code.  The idea of this post is to give you a set of tools you can use to debug your programs and make sure…

Declaring variables using suffixes in VBA

The usual way for declaring variables in VBA is to use the syntax  Dim myDbl As Double where we change the type according to the variable we want to create.  There is however another way of declaring certain variables within VBA that uses a suffix to the variable name.  The symbols you can use are described on the MSDN website here. …

Basic VBA 9: User defined types

Sometimes when coding we want to group together a set of related but different variables.  Examples could be a parameter set for a specific calculation (which we may want to vary later) or a set of properties we want to store and set for something we are working with. User defined data types (sometimes referred…

The Achilles trick

There are various bits of clever maths I use here and there I like to refer to as “tricks”.  In fact I use them often enough to give them my own pet-names.  The one we are going to cover in this post is one I use quite a lot and in particular when deriving closed…

Simple annuities key formulas

Annuities are going to pop up everywhere on TAoQF so it’s a good idea to understand them and have some easy to remember ways of deriving key results. In this post we give a brief reminder of these and it’s intended it will be used as a reference for future (rather than a tutorial). Key…

Basic VBA Bonus: simple error handling

This is the first of two bonus lessons within the basic VBA course.  The aim is to improve how your code handles run time errors – these are the errors that occur when your code is running (as opposed to compile time errors/syntax errors).  When we mean simple error handling we mean dealing with errors…

Basic VBA 7: Going loopy!

We have already seen a number of examples of how to iterate over a given set of data and perform some action.  In this post we formalise these techniques and learn a few additional ways of doing it.  Each method we cover has a similar structure but each differs in the details of how we…

Basic VBA 6: Directing program flow

In this post we cover a number of simple concepts together which are each related to directing the flow of your programs1The featured picture here is a geeky reference to a Yoda condition.  Although at first they look complex they are mostly very simple and it’s just a case of selecting the most appropriate one…