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.
pip install swedish-market-insights
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()
- Fetch inside trades by transaction date
- Fetch inside trades by publication date
- Fetch current short positions
- Fetch historical short positions
- Fetch aggregated short positions
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))
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))
from swedish_market_insights.short_positions import ShortPositionsAPI
current_short_positions = ShortPositionsAPI.get_current_short_positions()
Contributions are welcome! Please open an issue or submit a pull request on GitHub if you have any suggestions or improvements.
This project is licensed under the MIT License.