or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

commodity.mdcrypto.mdcurrency.mdderivatives.mdeconomy.mdequity.mdetf-index.mdfixedincome.mdindex.mdnews.mdregulatory.mdtechnical.md

etf-index.mddocs/

0

# ETF and Index Data

1

2

Exchange-traded fund and market index data including ETF analytics, index composition, and performance metrics. This module provides comprehensive access to ETF and index market data.

3

4

## Capabilities

5

6

### ETF Data

7

8

Exchange-traded fund data including performance, holdings, and analytics.

9

10

```python { .api }

11

def obb.etf.sectors(

12

provider: str = None,

13

**kwargs

14

) -> ResponseObject:

15

"""

16

Get ETF sectors data.

17

18

Parameters:

19

- provider: Data provider to use

20

21

Returns:

22

ResponseObject with ETF sectors data

23

"""

24

25

def obb.etf.holdings(

26

symbol: str,

27

provider: str = None,

28

**kwargs

29

) -> ResponseObject:

30

"""

31

Get ETF holdings data.

32

33

Parameters:

34

- symbol: ETF symbol

35

- provider: Data provider to use

36

37

Returns:

38

ResponseObject with ETF holdings

39

"""

40

41

def obb.etf.historical(

42

symbol: str,

43

provider: str = None,

44

**kwargs

45

) -> ResponseObject:

46

"""

47

Get historical ETF data.

48

49

Parameters:

50

- symbol: ETF symbol

51

- provider: Data provider to use

52

53

Returns:

54

ResponseObject with historical ETF data

55

"""

56

57

def obb.etf.search(

58

query: str,

59

provider: str = None,

60

**kwargs

61

) -> ResponseObject:

62

"""

63

Search for ETFs.

64

65

Parameters:

66

- query: Search term

67

- provider: Data provider to use

68

69

Returns:

70

ResponseObject with matching ETFs

71

"""

72

73

def obb.etf.info(

74

symbol: str,

75

provider: str = None,

76

**kwargs

77

) -> ResponseObject:

78

"""

79

Get ETF information.

80

81

Parameters:

82

- symbol: ETF symbol

83

- provider: Data provider to use

84

85

Returns:

86

ResponseObject with ETF information

87

"""

88

89

def obb.etf.countries(

90

provider: str = None,

91

**kwargs

92

) -> ResponseObject:

93

"""

94

Get ETF countries data.

95

96

Parameters:

97

- provider: Data provider to use

98

99

Returns:

100

ResponseObject with ETF countries data

101

"""

102

103

def obb.etf.holdings_date(

104

symbol: str,

105

provider: str = None,

106

**kwargs

107

) -> ResponseObject:

108

"""

109

Get ETF holdings by date.

110

111

Parameters:

112

- symbol: ETF symbol

113

- provider: Data provider to use

114

115

Returns:

116

ResponseObject with ETF holdings by date

117

"""

118

119

def obb.etf.price_performance(

120

symbol: str,

121

provider: str = None,

122

**kwargs

123

) -> ResponseObject:

124

"""

125

Get ETF price performance.

126

127

Parameters:

128

- symbol: ETF symbol

129

- provider: Data provider to use

130

131

Returns:

132

ResponseObject with ETF price performance

133

"""

134

```

135

136

### Index Data

137

138

Market index data including major benchmarks and custom indices.

139

140

```python { .api }

141

def obb.index.constituents(

142

symbol: str,

143

provider: str = None,

144

**kwargs

145

) -> ResponseObject:

146

"""

147

Get index constituents.

148

149

Parameters:

150

- symbol: Index symbol

151

- provider: Data provider to use

152

153

Returns:

154

ResponseObject with index constituents

155

"""

156

157

def obb.index.sectors(

158

provider: str = None,

159

**kwargs

160

) -> ResponseObject:

161

"""

162

Get index sectors data.

163

164

Parameters:

165

- provider: Data provider to use

166

167

Returns:

168

ResponseObject with index sectors

169

"""

170

171

def obb.index.available(

172

provider: str = None,

173

**kwargs

174

) -> ResponseObject:

175

"""

176

Get available indices.

177

178

Parameters:

179

- provider: Data provider to use

180

181

Returns:

182

ResponseObject with available indices

183

"""

184

185

def obb.index.sp500_multiples(

186

provider: str = None,

187

**kwargs

188

) -> ResponseObject:

189

"""

190

Get S&P 500 multiples data.

191

192

Parameters:

193

- provider: Data provider to use

194

195

Returns:

196

ResponseObject with S&P 500 multiples

197

"""

198

199

def obb.index.search(

200

query: str,

201

provider: str = None,

202

**kwargs

203

) -> ResponseObject:

204

"""

205

Search for indices.

206

207

Parameters:

208

- query: Search term

209

- provider: Data provider to use

210

211

Returns:

212

ResponseObject with matching indices

213

"""

214

215

def obb.index.snapshots(

216

provider: str = None,

217

**kwargs

218

) -> ResponseObject:

219

"""

220

Get index snapshots.

221

222

Parameters:

223

- provider: Data provider to use

224

225

Returns:

226

ResponseObject with index snapshots

227

"""

228

229

def obb.index.historical(

230

symbol: str,

231

provider: str = None,

232

**kwargs

233

) -> ResponseObject:

234

"""

235

Get historical index data.

236

237

Parameters:

238

- symbol: Index symbol

239

- provider: Data provider to use

240

241

Returns:

242

ResponseObject with historical index data

243

"""

244

```

245

246

## Usage Examples

247

248

### ETF Analysis

249

250

```python

251

from openbb import obb

252

253

# Access ETF data

254

# (Specific function calls depend on available ETF functions)

255

# Search for ETFs

256

etf_search = obb.etf.search(query="technology")

257

etf_df = etf_search.to_dataframe()

258

259

# Get ETF holdings

260

holdings_data = obb.etf.holdings(symbol="SPY")

261

holdings_df = holdings_data.to_dataframe()

262

```

263

264

### Index Data Retrieval

265

266

```python

267

# Access index data

268

# Get index constituents

269

constituents_data = obb.index.constituents(symbol="SPX")

270

constituents_df = constituents_data.to_dataframe()

271

272

# Get S&P 500 multiples

273

multiples_data = obb.index.sp500_multiples()

274

multiples_df = multiples_data.to_dataframe()

275

```

276

277

### ETF and Index Workflow

278

279

```python

280

# Compare ETF performance against benchmarks

281

# Analyze ETF holdings and sector exposure

282

# Track index composition changes

283

```