Package to scrape the Finansinspektion's registers
Project description
Swedish Market Insights
SMI is a small package for fetching inside trades made in Sweden.
The data is collected with requests
and parsed with BeautifulSoup4
and returned as a pandas.DataFrame
.
All data is publicly available on Finansinspektionen's website.
Installation
pip install swedish-market-insights
Usage
from swedish_market_insights.inside_trades import InsideTradesAPI
from swedish_market_insights.short_positions import ShortPositionsAPI
recent_inside_trades = InsideTradesAPI.get_trades_by_transaction_date()
current_short_positions = ShortPositionsAPI.get_current_short_positions()
Features
Inside Trades
- Fetch inside trades by transaction date
- Fetch inside trades by publication date
Short Positions
- Fetch current short positions
- Fetch historical short positions
- Fetch aggregated short positions
Examples
Fetch inside trades by transaction date
from swedish_market_insights.inside_trades import InsideTradesAPI
from datetime import date
trades = InsideTradesAPI.get_trades_by_transaction_date(
from_date=date(2020, 1, 1),
to_date=date(2020, 1, 31))
Fetch inside trades by publication date
from swedish_market_insights.inside_trades import InsideTradesAPI
from datetime import date
trades = InsideTradesAPI.get_trades_by_publish_date(
from_date=date(2022, 10, 8),
to_date=date(2022, 10, 10))
Fetch current short positions
from swedish_market_insights.short_positions import ShortPositionsAPI
current_short_positions = ShortPositionsAPI.get_current_short_positions()
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub if you have any suggestions or improvements.
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for swedish_market_insights-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | da108937dd6b3ce1fa4647cea05b47bbb6f9f071d752003ce0e4ab7962c8e76d |
|
MD5 | 0033f60ff7ee97ef98ac23c7ebe3a8f7 |
|
BLAKE2b-256 | 503fd092619c0f07ccb616906f0154c61edb784dd7dc666d00e2022bb18d234b |
Close
Hashes for swedish_market_insights-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82cb41835d89e233c64bba2b46e3808d1ab67536c1209aa891c1736ad060729f |
|
MD5 | c745c8a66e7bfa13bf440ff41bf27c05 |
|
BLAKE2b-256 | ec8ed53898d0a19f5aab14e573ed517704e0ebb3de2cf43383af97d75b214d92 |