I am doing some analysis with a data feed and I have a problem that I'm struggling to solve using Google, probably because my mathematical vocabulary is not sufficient to find what I'm looking for. It's probably quite simple to solve once I explain:
I have one value (A) that normally sits in the 0.3000000 to 0.4500000 range.
The second value (B) is on a vastly different scale : anything from -78,000,000 to +200,000,000
My goal is to compare A to B on a daily basis as part of a trading plan. Prior day values do not feature in the trading plan (so a relative change %age is not what I'm looking for).
I need to find a way of calculating a relationship between A and B (I'm guessing a ratio) but due to the massive swings of 'B' I can't get any useful numbers that sit within a sensible range. I have tried just moving the decimal places but the massive swings of B seem to throw this simple method off too. It may be that I need to use different decimal shifts each day but I don't know if that action 'compromises' my data.
Is there a mathematical function I can perform to normalise both sets of data so that, on any given day, I can compare A to B and compute a figure that is consistent (say from -1.00 to 1.00)?
Any help much appreciated, thanks.
Help needed from any mathematicians/statisticians please!
-
Jamesmsv
- Trader
- Posts: 11
- Joined: Tue Oct 16, 2018 2:13 pm
- Location: UK
- tomele
- Administrator
- Posts: 1208
- Joined: Tue May 17, 2016 3:40 pm
- Location: Germany, Forest of Odes, Defending the Limes
Help needed from any mathematicians/statisticians please!
You can transform each value X in the range of Xmin..Xmax to a Y value in the range Ymin..Ymax by an affine transformation like this:
Y=(X-Xmin)*(Ymax-Ymin)/(Xmax-Xmin)+Ymin
Transform A and B to the range 0..1 and the multiply them. The result is again in a range of 0..1.
Y=(X-Xmin)*(Ymax-Ymin)/(Xmax-Xmin)+Ymin
Transform A and B to the range 0..1 and the multiply them. The result is again in a range of 0..1.
Happy pippin, Thomas 
It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so. (Mark Twain)
Keep the coder going: Donate
It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so. (Mark Twain)
Keep the coder going: Donate
-
Jamesmsv
- Trader
- Posts: 11
- Joined: Tue Oct 16, 2018 2:13 pm
- Location: UK
Help needed from any mathematicians/statisticians please!
That sounds like exactly what I was after, thank you very much 