4
$\begingroup$

How can we get/calculate all the available FinancialIndicators outside TradingChart and InteractiveTradingChart?

Using InteractiveTradingChart we can retrieve and add valuable data from an asset for our study with something like:

InteractiveTradingChart[{"GOOGL", {{2022, 1, 1}, {2023, 1, 1}}}]

or

InteractiveTradingChart[FinancialData["GOOG", "OHLCV", {{2022, 1, 1}, {2023, 1, 1}}]]

There we can add and use 100 different financial indicators (FinancialIndicator[]) as the following:

{AbsolutePriceOscillator,AccumulationDistributionLine,AccumulativeSwingIndex,Aroon,AroonOscillator,AverageDirectionalMovementIndex,AverageDirectionalMovementIndexRating,AverageTrueRange,ChaikinMoneyFlow,ChaikinOscillator,ChaikinVolatility,ChandeMomentumOscillator,CloseLocationValue,CloseLocationValueVolume,CommodityChannelIndex,CommoditySelectionIndex,DemandIndex,DetrendedPriceOscillator,DirectionalMovement,DynamicMomentumIndex,EaseOfMovement,FastStochastic,ForceIndex,ForecastOscillator,FullStochastic,Inertia,IntradayMomentumIndex,KlingerOscillator,LinearRegressionSlope,MarketFacilitation,MassIndex,MESAPhase,MESASineWave,Momentum,MoneyFlowIndex,MovingAverageConvergenceDivergence,MovingAverageConvergenceDivergenceHistogram,NegativeVolumeIndex,OnBalanceVolume,PercentagePriceOscillator,PercentageVolumeOscillator,Performance,PolarizedFractalEfficiency,PositiveVolumeIndex,PriceVolumeTrend,ProjectionOscillator,QStick,RandomWalkIndex,RangeIndicator,RateOfChange,RelativeMomentumIndex,RelativeStrengthIndex,RelativeVolatilityIndex,RSquared,SlowStochastic,StandardDeviation,StandardError,StochasticMomentumIndex,SwingIndex,TimeSegmentedVolume,TRIX,TrueRange,UltimateOscillator,VerticalHorizontalFilter,Volume,VolumeRateOfChange,WilliamsAccumulationDistribution,WilliamsPercentR,AccelerationBands,BollingerBands,SimpleMovingAverage,HullMovingAverage,DoubleExponentialMovingAverage,ExponentialMovingAverage,ParabolicStopAndReversal,VolatilitySystem,WeightedMovingAverage,LinearRegressionTrendlines,LinearRegressionIndicator,MedianPrice,VariableMovingAverage,TriangularMovingAverage,TripleExponentialMovingAverage,TimeSeriesForecast,KeltnerChannels,TypicalPrice,MovingAverageEnvelopes,PriceChannels,ProjectionBands,RaffRegressionChannel,StandardDeviationChannels,StandardErrorBands,WeightedClose,WildersMovingAverage,Close,High,Low,Open,HighestHigh,LowestLow}

How can we get/calculate all of these indicators from our data?

data = FinancialData["GOOG", "OHLCV", {{2022, 1, 1}, {2023, 1, 1}}]

Or how can we extract the data from the TradingChart or InteractiveTradingChart so we can use them separately?

We are specially interested in using the OHLCV among with the FinancialIndicator data to apply and train some ML models.

$\endgroup$

1 Answer 1

3
$\begingroup$

It seems there's a way to do it, luckily :)

data = FinancialData["GOOG", "OHLCV", {{2022, 1, 1}, {2023, 1, 1}}]

financialIndicators = AssociationMap[ FinancialIndicator[#][data] &, FinancialIndicator[]];

(*financialIndicators = ParallelMap[<|#1 -> FinancialIndicator[#1][data]|> &, FinancialIndicator[]]*)

P.S.: Now applying the suggestion from @JoshuaSchrier.

$\endgroup$
2
  • 1
    $\begingroup$ You could alternatively try something like: financialIndicators = AssociationMap[ FinancialIndicator[#][data] &, FinancialIndicator[]]; to simplify the creation of the association. (This is also about 3x faster than ParallelMap) . $\endgroup$ Mar 10, 2023 at 19:11
  • 1
    $\begingroup$ Oh, that's interesting @JoshuaSchrier, I'm going to try it here ;) $\endgroup$
    – GarouDan
    Mar 11, 2023 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.