Category Archives: TI-84 Plus Pocket SET

Date arithmetic in TI Nspire

The TI Nspire CX (and also 83, 84, 89 series) provided a useful date function, dbd(), for finding the number of days between two input dates. However, after nothing turn up searching for function to perform days addition, a quick and dirty program is developed by taking advantage of this built-in function.

The program takes two parameters: a date and the number of day to add, and basically brute force a range of dates to check if the dbd() function returns a value equals that of the intended number of days to add. The program assumed the format DDMM.YY, while the built-in dbd() function accepts format in either DDMM.YY or MM.DDYY.

datecalc1

Advertisements

$1.3 billion Powerball Odds

As reported in news the prize of Powerball grows to $1.3 billion. The last change of the rule of the game increased the odds, which is believed to be the cause for accumulation of jackpot since November. Using TI-84, the odds for the old and new rules are calculated below using the nCr() function. Old odds is 1 in 175 million while under the new rule it is now 1 in 292 million.

powerball

Black-Scholes formula in TI-84 Solver

Came across a ten-year old article from TI on working with the Black-Scholes pricing model in TI-84. In it, a couple of examples are given to utilize various features of the TI-84 to work with the equation to derive an European call option in the Black-Scholes model. One of these method being invoking the Solver.

Entering the equation again is considered quite cumbersome, and it is not quite sure how to archive the Solver equation for later use. After a couple of tries, it become obvious that the Solver wouldn’t work with a function stored in String at all. Fortunately alternative method is found to somehow persist the equation for later use.

The trick is to make use of the following build-in functions available in the TI-84:

  • String>Equ()
  • expr()

By making use of these two functions, the Solver will be able to handle the Black-Scholes equation which is stored in String properly. Firstly the equation must be stored in a String, and then by making use of String>Equ() function, the equation will be able to persist in one of the equation variables. In this form, the Solver will be happy to work with it in its entirety, which means all variables are considered. The equation stored in Str0 is converted to function Y0, and is then processed properly by the Solver as shown in the below screens. For persisting, this can be done in a program including the definition of the Black-Scholes formula itself.