Sha256: 86eb62e7210243ad43f05edb79d9f4df08af7913ea836c9662e5b06b9de1e5fd

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

# StockIndex

This gem provides the components of major stock indices in the world. The components are scraped from reference
pages, such as Wikipedia.

## Installation

Add this line to your application's Gemfile:

    gem 'stock_index'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install stock_index

## Supported indices

There is no a standard for indices symbols, so this gem uses Yahoo Finance symbols.

| Symbol | Index Name | Reference page |
| ------ | ---------- | -------------- |
| ^DJI | Dow Jones Industrial Average | http://en.wikipedia.org/wiki/Dow_Jones_Industrial_Average |
| ^GSPC | S&P 500 | http://en.wikipedia.org/wiki/List_of_S%26P_500_companies |
| ^NDX | NASDAQ 100 | https://indexes.nasdaqomx.com/Index/Weighting/NDX |
| ^N225 | Nikkei 225 | http://indexes.nikkei.co.jp/en/nkave/index/component?idx=nk225 |
| ^STOXX50E | EURO STOXX 50 | http://www.stoxx.com/indices/index_information.html?symbol=SX5E |
| ^FTSE | FTSE 100 | http://www.londonstockexchange.com/exchange/prices-and-markets/stocks/indices/summary/summary-indices-constituents.html?index=UKX |

## Usage

```ruby
components = StockIndex.new('^DJI').components
```
This method returns an array of components. Each component is a Hash with this format:

```ruby
{
  :market => 'XNYS',
  :symbol => 'MMM',
  :name => '3M CO'
}
```

## Contributing

1. Fork it ( http://github.com/<my-github-username>/stock_index/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Copyright

Copyright (c) 2014 – ∞ Javier Vidal

## License

This gem is released under the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stock_index-0.0.1 README.md