Calculate outliers in DataSeries for different symbols
Author: ubaldorojas
Creation Date: 6/27/2019 7:14 PM
profile picture

ubaldorojas

#1
Guys,

how could I append 2 or more DataSeries from different symbols into one array?
for example:
symbol A
symbol B
symbol C

MyArray = (DataSeries from symbol A, DataSeries from symbol B, DataSeries from symbol C);

Thanks!
profile picture

Eugene

#2
Hi,

Why would you need that? If you clarify maybe we could find a shortcut to get there.
profile picture

ubaldorojas

#3
I want to calculate the outliers of each datapoint of each DataSeries of each symbol
profile picture

Eugene

#4
We're getting closer. Not sure if the idea of putting the OHLC of different symbols into one collection makes sense to me. If their absolute price values are too different (like AMZN and GE), wouldn't this be a comparison of apples to oranges?

At any rate, here's how to find outliers and calculate quartiles in WealthScript:

Interquartile Range (IQR) as indicator of volatility, post #2

Further reading: Interquartile Ranges & Outliers
profile picture

ubaldorojas

#5
Eugene,

the intention is to put the rate of a dataseries respect another dataseries (e.g RSI(Close,20) / RSI(Close,60) ).
It would be in similar tickers from the same commodity that behave similar (Aerospace with aerospace, retailers with retailers, etc); and similar alphas and betas respect to SP500.

finally, I am using Grubbs test to identify outliers.

https://en.wikipedia.org/wiki/Grubbs%27s_test_for_outliers

thanks!



profile picture

Eugene

#6
Here's convenient helper method for converting a DataSeries into array: DataSeries.ToArray
profile picture

ubaldorojas

#7
It made the trick!
thanks Eugene!
profile picture

Eugene

#8
De nada.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).