Oscillator comparison in Excel - ouch, real headache!

holiday

Board Regular
Joined
Jul 25, 2007
Messages
86
Dear everyone!

I've got a problem I'm hoping somebody may be able to help with!

Basically, I analyze a collection of plots which I update every day in Excel. They are simple line plots and they basically fluctuate up and down like oscillators but are by no means "neat" oscillations, rather they GENERALLY go up and down between two "extremes" but always a bit jagged and rough (that's ok, that's part of my analysis). I update (with one new plot per day) and monitor between 100-200 of these charts in Excel every day for agricultural use all year round.

My need: I need Excel to automatically assess each chart and decide which is the most coherent as a "neat oscillator" and basically rank them (from the best [neatest, most smoothest and reliable] output in terms of being a pure oscillator with minimum noise all the way down the worst one [most noisy, incoherent and simply messy]). I want to run the query every day or week to keep track of which chart is, quite simply, the nicest the view and analyze in terms of being a pure and simple fluctuating oscillator.

Now I know it sounds quite complex but I have been thinking hard and basically all it comes down to is having a set of pre-defined rules that make an oscillator-type chart "the most coherent" and simply programming these rules into Excel for it to be able to rank multiple charts. But I'm new to VB, a bit better at Excel as a whole, but no expert. Plus I'm thinking (hoping) there may be a simple solution I have missed: maybe some form of built-in function in Excel (2007 I use) which is a statistical function I've never heard of that does exactly what I need..... but I'm not betting there is!!

Of course, by using my human eye and brain I can rank them by using discretion and saying "hmmm, that one looks like a neater oscillator than that one.." etc.. but because I use so many charts, and maybe more in the future, I really want to be able to update the plots, click a button and see a rank of best to worst.

The result? I want to instantly see that the oscillations in chart A are more predictable and reliable than chart B, and chart E are more than chart K, etc... so I know which agricultural methods work more consistently year on year throughout seasons with minimal error and noise.

Any takers?!! I am soooo grateful for any help on this one. Please ask as many questions as you want to if you need to, I'm just hoping some brainy person out there has the answer.

Many thanks

Holiday (oh, and Merry Xmas everyone)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Maybe a snap is better for helpers to catch your meanings.

If there are no secrets about your data,you may email it to me,I'll help you within days.

Best Regards
Northwolves
 
Upvote 0
Dear Northwolves

Thanks - I'd like to post an example but my settings are saying "you may NOT post attachments"....

However, in reality, I think I rambled on too long over a simple idea: imagine 200 charts which are simply values oscillating back and forwards over time, but not cleanly, rather they are bobbing up and down as they go. A perfect oscillator is like a perfect SineWave, smooth and predictable as it goes up and down. My charts are not perfect. I need a way to be able to "rank" them (ie: 1-200) with number 1 being as close to a perfect SineWave-type oscillator (smooth, coherent, pleasing to the eye, just like a perfect SineWave oscillation) all the way down to number 200 which will be, no doubt, as messy as heck!!

Whichever is the easiest way to display the rankings is fine by me, I'm not fussy, I just need to be able to have Excel say "hey, this chart is really smooth and predictable whereas this one is messy and rubbish" - lol, excuse the banter there but you get my point.

Example:
If you plotted these numbers...
1, 6, 10, 13, 15, 16, 16.5, 16.8, 16.5, 16, 15, 13, 10, 6, 1
...you would have a nice oscillation upwards where it peaks ar 16.8 and perfectly comes down the other way back to 1. This is a very similar to a typical SineWave.

But if I plotted these numbers...
1, 3, 5, 8, 7, 10, 13, 12, 15, 16.8, 15, 14, 10, 12, 11, 9, 6, 3, 1
...you would still have the same move "on the whole" as it went from 1 to a peak of 16.8 but it wasn't "clean" all the way up and down, it got a little messy.

Out of these two plots, the first would be ranked "1" as it was the nicest and most coherent SineWave-type plot, whereas the second plot would be ranked "2" as it wasn't as good as the first.

I need to do this over about 200 charts, or any amount I choose.

I really just need Excel to be able to detect how coherent each chart is and say "that's a neat one" and "that's not a neat one" (in relation to what a perfect SineWave looks like).

I hope this helps understand my madness!!! LOL!!

PS: Northwolves, I couldn't find your email address... if you need me to email you anything over (like some real data if you do need this) then please post your email and I will.
AND THANK YOU SO MUCH!!!

Holiday
 
Upvote 0
Ok it may be weird for a person to answer their own question in this forum, but I have worked it out and thought I may as well post the answer just in case anyone wanted to know it LOL!!!

Correlation to a perfect peak-to-peak line seems to be the answer... from the top of any one oscillation to the bottom (which will only be known in retrospect, but that's ok as this analysis is not for forecasting but rather for "ranking" recent data).

So once the absolute top and bottom of the wave is known, work out the vertical range (Y) of the wave (which is simply the high minus the low) and divide Y by the amount of horizontal plots (X) it took to go from high to low (or low to high) - this will produce the value of N.

Once I know N, I can plot a perfect straight line between these two points (high and low) by using N as the increment (as N*X = Y).

Now that I have plotted this perfect point-to-point line in Excel, I simply use the CORREL function to give me the correlation output of this perfect line and my actuall data plot. The closer my actual data plots are correlated to the perfect straight line, the more perfect my oscillator charts are and so the closer the correlation output will be to 1. (Correlation is ALWAYS between -1 and 1, with -1 being perfect OPPOSITE correlation and 1 being perfect correlation).

In a nutshell, the more mess and noise in my oscillating chart from point to point, the lower the correlation "score". If I want to find "clean" and predictable oscillation charts, I look for higher correlation scores.

So I can then do this over my many oscillating charts, going back any amount of data (eg: 3 whole oscillations works fine for my needs) and sort the correlation outputs from highest to lowest in one column. This is my automatic ranking system!!! Not very fancy, no, but hey it works!!

Ok, no-one may care about this at all in the whole world, but I'm just glad I found my answer!! LOL!! Merry Xmas for 2007..........................

Holiday
 
Upvote 0
Happy for your finding the answer by yourself.

Maybe it exists some other answers,send your data to me (northwolves@163.com) if your are not mind.

Best Regards
Northwolves
 
Upvote 0
Dear Northwolves

I have sent you an email to your address (my email is gogogadget50@hotmail.com) saying thanks, I may have cracked this particular problem, but any chance you would be able to help me a little more on my project in Excel...? I know it's cheeky to ask, but us Excel non-pros really do seem to get stuck pretty bad LOL I know I do.

Thanks for your time and help

Holiday

PS: I don't have a list of problems ready or anything, I just know I am going to need a helping hand as things get a little more..... complex...!!
 
Upvote 0

Forum statistics

Threads
1,223,375
Messages
6,171,738
Members
452,419
Latest member
mapa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top