InFondos
InFondos is a web app that visually presents structured data from the CNMV (equivalent to 13F filings in the US). Drawing from similar concepts as those used by Dataroma, InFondos extends this approach to encompass the entire universe of funds and SICAVs in Spain.
Its main features are:
- Comprehensive Data: The application provides detailed data on all investment funds and SICAVs registered in Spain.
- Data Visualization: By visually presenting structured data from the CNMV, it allows users to easily understand and interpret complex investment information.
- Holdings Tracking: InFondos allows users to see which funds hold a specific position and to track any increases or decreases in those positions over time.
- Investment Opportunities: InFondos is a powerful tool for identifying potential investment opportunities. By studying the holdings of different funds, users can leverage the knowledge and strategy of investment professionals to find promising investment options. This is particularly beneficial for individual investors looking to expand their portfolio based on expert fund management strategies.
- Overlap Analysis: Utilizing graph theory concepts, the app identifies overlap in holdings between different funds, allowing users to understand the similarities and differences in fund strategies.
- Market Trends: The platform generates biannual statistics, offering users a comprehensive view of market trends and investment behaviors.
- User-Friendly Interface: Despite the complex data it manages, InFondos offers an interface that is intuitive and easy to navigate, catering to both investment professionals and individual investors.
- Direct Comparisons: With InFondos, users can compare funds side-by-side to make informed decisions about their investments.
- Updated Information: InFondos maintains up-to-date data by frequently refreshing information based on the latest CNMV filings.
Technical implementation
Utilizing AWS Lambda functions, web scraping is performed on CNMV data to obtain a complete list of funds, including their internal IDs. With this information, additional web scraping is performed to generate (and download) semiannual XML files with data for all the funds.
This data is processed and combined with OpenFigi data to obtain tickers and information about the funds’ holdings, as this information is identified only by an ISIN code in the original data. This information is structured and inserted into SQLite for easier analysis. Later, using other AWS Lambda functions, this structured data is processed and loaded into DynamoDB:
To access the data stored in DynamoDB, an API was deployed with AWS API Gateway. This enables the web application, which consists of only three dynamically loaded pages (Fund, Position, Landing), to display content based on the data returned by the API. The API triggers auxiliary AWS Lambda functions that query the data from DynamoDB.
The website hosting was set up on Cloudflare, as the domain was purchased there and they offer free firewall rules, cache, and rate limiting. The REACT application was deployed using AWS Amplify due to its simplicity:
- Python
- AIOHTTP: To perform HTTP requests asynchronously.
- BeautifulSoup: To process XML files.
- Pyenchant: To correct special characters or encoding errors in the files.
- REACT
- Bootstrap: To build the user interface (responsive, community support and grid system). Flatly was used as Theme.
- pako: To deal with binary data (GZIP is used by the API to retrieve JSON data).
- React Icons: To use predefined icons like Search, Mail or Twitter.
- SQLite: To easily structure the data and to facilitate data analysis (Way more cheaper than using AWS Aurora).
- Cloudflare: Way more cheaper than using AWS Aurora.
- AWS Lambda: To run the Python code that extracts, process and serves the data.
- AWS DynamoDB: To store the data that is going to be queried by the API.
- AWS API Gateway: To build the API that the web app is using to dinamycally get the data needed.
- AWS Amplify: To easily deploy the React app.