# Sharpen Calculation Skills

#### Phylo

##### Established member Good Joke (for mathematically inclined) – the nonsense should be fairly obvious. However, I wonder how obvious....

There is nothing special about today, this year, any other year or every 1,000 years.
1. If the age of anyone on the 31 December (note: the last day of the year) is added to the year of their birth the sum will – always = the current year, exact.
2. If the age of anyone is calculated before their birthday of the current year then the sum of their age + year of birth will – always = the current year - 1 year (the current year less 1 year).
Example 1:
Anthony Hopkins (an actor, by way of example - see wikipedea, if interested) was born 31 Dec 1937.

This year, at current date - 6 Dec 2022 - Anthony is 84 years old.
84 + 1937 = 2021.
This year, on 31 Dec 2022 - Anthony will be 85.
85 + 1937 = 2022. (the current year, exact)

Example 2:
Next year, on 1 Jan 2023 Anthony will - still - be 85.
85 + 1937 = 2022.
Next year, on the 31 Dec 2023 Anthony will be 86.
86 + 1937 = 2023. (the current year, exact)

LAUGH OF THE DAY – anyone interested in more calculations with basic calculus ?
Some may find of interest and swing traders may be inspired to rediscover mathematical entertainment and sharpening of calculation skills while waiting for swing alert/s.

To code more complex indicators and automations an understanding of at least basic Mathematics is, at times, required.

Calculating the FTSE 100

Came across this actual problem in a book I chanced to glance through. The book provides answers to questions. I provide solution calculations (accommodate any typos) - some basic calculus.

[Question - 5.2 Contextual Q:3]
• On a particular day, the Financial Times 100 Share Index (FTSE 100) opens in London at 4,000.
• During the rest of the day, its value t hours at 9 a.m. is given as F = 4,000 - 16t^2 + 8t^3 - 3/4t^4.
• A broker is instructed to sell* the client’s position only if the value of the FTSE is falling.
• * according to pre-agreed increments and criteria – not relevant to Question and Answers and solutions.
Comment: 16t^2 = 16 x (t to exponent 2) ; 8t^3 = 8 x (t to exponent 3) ; etc.

Questions:
1. What is the value of the FTSE at noon.
2. Calculate the highest value of the index during the day and at what time to the nearest minute did this occur.
3. If trading finishes at 4.30 p.m., by how much has the index risen or fallen during the day.
4. During which times of the day could the broker have sold off the clients position ?
1. 4011.3 points. note: indexes are designated in points (professionally) not pips.
2. 4183.9 points at 3.19 p.m.
3. Rise of 102.0 points at 4.30 p.m.
4. Between 9 a.m. and 10.41 a.m. and between 3.19 p.m. and 4.30 p.m.
SOLUTIONS:

Solution A:
12.00 (noon) - 9.00 = 3. Therefore: t = 3. Note: 9.00 a.m. ~ t = 0; 10 a.m ~ t = 1; 11.00 a.m ~ t =2; 12.00 p.m. ~ t = 3.

At 9.00 a.m ~ t = 0
F = 4,000 - 16t^2 + 8t^3 - 3/4t^4
F= 4,000 - 16(0^2) + 8(0^3) - 3/4(0^4)
F= 4,000 - 16(0) + 8(0) - 3/4(0)
F= 4,000 - 0 + 0 - 0
The index = 4,000 points at 9.00 a.m. or when time t = 0.

At 12.00 ~ t = 3
F = 4,000 - 16t^2 + 8t^3 - 3/4t^4
F= 4,000 - 16(3^2) + 8(3^3) - 0.75(3^4)
F = 4,000 - 16(9) + 8(27) - 0.75(81)
F = 4,000 - 144 + 216 - 60.75
F= 4,011.25
F= 4,011.3

Answer A: The index vaue is 4,011.3 points at noon (12.00 p.m.)

Solution B:
• Differentiate F(t) to determine local and absolute maximum/minimum values.
On a graph t(time) would be the horizontal axis and F (points) would be the vertical axis.
Normally the horizontal axis is designated the x-axis with x-values and the vertical axis is designated y-axis with y-values.
In this instance t(time) is equivalent to the x-axis and index point values equivalent to the y-axis. ---> this may help:

F = 4,000 - 16t^2 + 8t^3 - 3/4t^4
F'(t) - differentiated = -32t + 24t^2 -3t^3
Note: F'(t) is differentiated to the first order; F"(t) is defferentiated to the second order.
F"(t) = -32 + 48t - 9t^2
F'"(t) = 48 -18t

Note:
F = 4,000 - 16t^2 + 8t^3 - 3/4t^4 can also be arranged as - pay attention to (-) signs and (+) signs -
F = -3/4t^4 + 8t^3 - 16t^2 + 4,000.
F'(t) = -32t + 24t^2 -3t^3 can also be arrange as
F'(t) = -3t^3 + 24t^2 - 32t.
The latter is the normal way - presenting expressions/equations in decending exponential order of power - but it is not necessary.
It also become tedious to be pedantic about exact/strict/rigorous mathematical notation when knocking off a few quick solutions.
However, whether decending or assending, incremental exponential order of powers should be maintained.

Factorise - t:
-32t + 24t^2 -3t^3 = t(-32 + 24t - 3t^2)
a: t=0,
b: -32+24t-3t^2 = 0 or rearranged b: -3t^2+24t-32 (see above Note)

Apply -
quadratic formula to -32 + 24t - 3t^2 or
cubic formula to -32t + 24t^2 -3t^3

Sharp EL-W505T, may be suitable, cheap and considered superior features to comparable Casio – and bonus one key press ease of access re Pi - (not referal links) https://www.amazon.co.uk/Sharp-EL-W5.../dp/B07PHT9LN4 / https://www.sciencestudio.co.uk/product/sharp-el-w506t/

Applying quadratic formular to -32 + 24t - 3t^2
(note: calculator inputs will be in order, -3,+24,-32)
Then:
t2 = 1.690 (derived from factorisation -> quadratic formular calculation) [calculator or pen/paper if hardcore]
t3 = 6.309 (derived from factorisation -> quadratic formular calculation)
and t1 = 0 (derived from factorisation - refer a: )

Applying qubic formular to -32t + 24t^2 - 3t^3 (note: calculator inputs will be in order, -3,+24,-32,0)
Then:
t1 = 0 (derived from cubic formula calculation) [calculator or pen/paper if hardcore]. Note: The 'solve any cubic-synthetic division method' as touted by clickbate YouTuber's is not univeral and only solve for the YouTuber's cherry-picked equations. For a fuller understanding of cubic formular see - Enhancements - at end of post
t2 = 1.690 (derived from cubic formula calculation)
t3 = 6.309 (derived from cubic formula calculation)

Process t1
F1 = 4,000 - 16t1^2 + 8t1^3 - 3/4t1^4
F1 = 4,000 - 16(0^2) + 8(0^3) - 4/4(0^4)
F1 = 4,000 - 0 + 0 - 0
F1 = 4,000 (point value at t = 0 or 9.00 a.m.)

Process t2
F2 = 4,000 - 16t2^2 + 8t2^3 - 3/4t2^4
F2 = 4,000 - 16(1.69^2) + 8(1.69^3) -3/4(1.69^4)
F2 = 4,000 - 16(2.8561) + 8(4.826809) - 0.75 (8.15730721)
F2 = 4,000 - 45.6976 + 38.614472 -6.117980408
F2 = 3,986.798892
F2 = 3,986.8 points
Calculating time: 1.69
Minutes: .69(60) = 41.4 = 41
Hours: 9.00 + 1 = 10
Time2 = 10.41

Process t3
F3 = 4,000 - 16t3^2 + 8t3^3 - 3/4t3^4
F3= 4,000 - 16(6.309^2) + 8(6.309^3) -3/4(6.309^4)
F3= 4,000 = 16(39.8034) + 8(251.120) - 0.75(1,584.317)
F3 = 4,000 - 636.855 + 2,008.96 - 1,188.237
F3 = 4,183.868
F3 = 4,183.9
Calculation time: t = 6.309.
Hours: 9:00 + 6 = 15
Minutes: .309(60) = 18.54 = 19
Time3 = 15:19 = 3.19 p.m.

Answer B: The highest value of the index is 4,183.9 points at 3.19 p.m.

Solution C:
Time: t = 16.30 - 9.00 = 7.30 ; 30 minutes / 60 minutes = 0.5 ; t = 7.5
F = 4,000 - 16t^2 + 8t^3 - 3/4t^4
F = 4,000 - 16(7.5^2) + 8(7.5^3) - 0.75(7.5^4)
F= 4,000 - 16(56.25) + 8(421.875) - 0.75(3,164.0625)
F= 4,000 - 900 + 3375 - 2373.146875
F = 4,101.853125
F = 4,102
4,102 - 4,000 = 102

Answer C: The index has risen by 102 points at 4.30 p.m.

Solution D:
At 9.00 a.m. point value = 4,000.0
At 10:41 a.m. point value = 3,986.8 (this was the min value- determined by 1st level calculus differentiation)
At 3.19 p.m. point value = 4,183.9 (this was the max value-determined by 1st level calculus defferentiation)
At 4.30 p.m point value = 4,102.0
The index was falling between 9.00 a.m and 10.41 a.m. and 3.19 p.m. and 4.30 p.m.

Answer D: The broker could have incrementally sold off the client's position between 9.00 a.m - 10.41 a.m and 3.19 p.m. and 4.30 p.m.

Enhancements

Note: Solve 'any' Cubic Equations - Synthetic Division Method: as touted by clickbate-youtubers is not a universal solution method as made to believe and will eventually fail outside the scope of clickbate-youtuber example criteria.

Mathologer is solid-bonafide-professional.

Last edited:

#### Phylo

##### Established member
Margin Calculations

This post is copy & paste with minor rearrangements of my FF post 27-Apr-2016.

1 micro lot = 0.01 = 1,000 currency units.
1 mini lot = 0.10 = 10 micro lots = 10,000 currency units.
1 lot = 1.0 = 10 mini lots = 100 micro lots = 100,000 currency units.

The first currency of a forex pair is the base currency and the second is the quote currency.
Easy remembrance: Alphabetically b is before q → (b) base first / (q) quote second.
Example: GBP/USD = base/quote

The below gives a sense of the scope of available margin ratios and the differences between deposit currency and base currency at parity and deposit currency and base currency subject to exchange rates.

Weekday and Weekend Margins Dukascopy Bank: https://www.dukascopy.com/europe/eng...counts/margin/

Account Deposit Currency: GBP
Currency Pair: GBP/USD
Position Size: 1 lot (100,000 currency units)
Margin Rate: deposit currency / base Currency = 1 GBP / 1 GBP = 1   margin = margin rate x exchange rate x position size in currency units. *

* exchange rate = account deposit currency/base currency

If the account deposit currency is the same as the base currency the exchange rate will be parity (1).
• 1:30 margin = 1/30 x 1 x 100,000 = 3,333 GBP.
• 1:60 margin = 1/60 x 1 x 100,000 = 1,667 GBP.
• 1:90 margin = 1/90 x 1 x 100,000 = 1,111 GBP.
• 1:100 margin = 1/100 x 1 x 100,000 = 1,000 GBP.
• 1:200 margin = 1/200 x 1 x 100,000 = 500 GBP.
• 1:300 margin = 1/300 x 1 x 100,000 = 333 GBP.
Account Deposit Currency: USD
Currency Pair: GBP/USD
Position Size = 1 lot (100,000 currency units)
Exchange Rate: deposit currency / base currency = 1.499 USD / 1 GBP • 1:100 margin = 1/100 x 1.459/1 x 100,000 = 1,459 USD
• 1:30 margin = 1/30 x 1.459/1 x 100,000 = 4,863 USD.
Account Deposit Currency: GBP
Currency Pair: EUR/JPY
Position Size: 1 lot (100,000 currency units)
Exchange Rate: deposit currency / base Currency = 1 GBP / 1.29 EUR • 1:100 margin = 1/100 x 1/1.29 x 100,000 = 775 GBP
• 1:30 margin = 1/30 x 1/1.29 x 100,000 = 2,583 GBP
Account Deposit Currency: USD
Currency Pair: EUR/JPY
Position Size: 1 lot (100,000 currency units)
Exchange Rate: deposit currency / base currency = 1.13 USD / 1 EUR • 1:100 margin = 1/100 x 1.131/1 x 100,000 = 1,131 USD
• 1:30 margin = 1/30 x 1.131/1 x 100,000 = 3,770 USD
Note: Some brokers have fixed margins and pairs where the deposit currency and the base currency are not at parity and would otherwise be subject to exchange variation are given an added currency padding and the margin locked at a set value.

Note: If the Dukascopy link is accessed it will be noted that while Dukascopy designates FX units like for like (1,000 units as 1,000 units) lots are designated as follows: 0.01 lot as 0.001 million, 0.1 lot as 0.01 million and 1.0 lot as 0.1 million (100,000/1,000,000 = 0.1).

Last edited:

#### Phylo

##### Established member
pi #### Phylo

##### Established member
3.1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679xxxxxxxxxxxxxxxxxx...........................................................................

Replies
13
Views
3K
Replies
11
Views
8K
Replies
1
Views
2K
Replies
0
Views
372
Replies
4
Views
4K