Building an automated SEC securities lending reporting system from scratch
A major financial institution needed to comply with new FINRA securities lending reporting requirements. They had an existing SFTR system but nothing for SEC. The deadline was tight, the business logic was complex (20+ reporting scenarios), and there was zero room for error — T+1 deadlines with potential fines for non-compliance.
What I built
I designed and implemented the complete system over several months — database schema, C# processing engine, JSON file generation, SFTP transmission, and an 881-test automated test suite.
- Normalised database schema with dedicated SEC tables, linked to existing SFTR data to avoid duplication
- Event-driven C# processing engine handling 20+ distinct reporting scenarios
- MD5 hash comparison for detecting actual data changes vs. redundant updates
- Intelligent report type determination engine mapping SFTR actions to FINRA report types
- BZip2-compressed JSON file generation with SFTP auto-transmission
- Batch processing schedule aligned to trading hours (13:30, 16:30, 23:00)
- 881 automated xUnit tests with parallel execution and CI/CD in Azure DevOps