Skip to contents

[Deprecated]

The fear and greed index is a market sentiment indicator that measures investor emotions to gauge whether they are generally fearful (indicating potential selling pressure) or greedy (indicating potential buying enthusiasm)

Usage

getFGIndex(from = NULL, to = NULL)

Arguments

from

An optional character-, date- or POSIXct-vector of length 1. NULL by default.

to

An optional character-, date- or POSIXct-vector of length 1. NULL by default.

Value

An xts-object containing,

index

<POSIXct> the time-index

fgi

<numeric> the daily fear and greed index value

Sample output

#>                     fgi
#> 2024-05-12 02:00:00  56
#> 2024-05-13 02:00:00  57
#> 2024-05-14 02:00:00  66
#> 2024-05-15 02:00:00  64
#> 2024-05-16 02:00:00  70
#> 2024-05-17 02:00:00  74

Details

Classification

The Fear and Greed Index goes from 0-100, and can be classified as follows,

  • 0-24, Extreme Fear

  • 25-44, Fear

  • 45-55, Neutral

  • 56-75, Greed

  • 76-100, Extreme Greed

About the Fear and Greed Index

The fear and greed index is a market sentiment indicator that measures investor emotions to gauge whether they are generally fearful (indicating potential selling pressure) or greedy (indicating potential buying enthusiasm).

Source

This index is fetched from alternative.me, and can be different from the one provided by coinmarketcap.

See also

Author

Serkan Korkmaz

Examples

if (FALSE) {
  # script start;

  # 1) get the fear and greed index
  # for the last 7 days
  tail(
    fgi <- cryptoQuotes::get_fgindex(
      from = Sys.Date() - 7
    )
  )

  # script end;
}