Pedro Del Nero Todescan

Summary

  • Portfolio of projects spanning finance, quantitative analysis, and digital finance.
  • Work includes market modeling, data‑driven analysis, blockchain systems, and automation.
  • Projects explore real‑world constraints, technical trade‑offs, and applied system design.

1. LLM_FinancialAnalysis – Analyzing financial statements with LLMs

Project Link

Objective

LLM_FinancialAnalysis is a project aimed at replicating the methodology used in the paper "Financial Statement Analysis with Large Language Models". This repository focuses on applying the methodology specifically to Brazilian public companies, aiming to replicate the study's methodology and learn how to interact with the OpenAI api.

Description

In this project, I built a pipeline using OpenAI API to analyze financial statements stored in an SQL database. With this data the model was prompted to analyse and predict key financial metrics. The objective of testing the ability of financial LLMs to predict future financial performance, particularly focusing on Earnings.

Steps

  • Data Retrieval: Using SQL, I retrieve financial data such as income statements and balance sheets for a list of companies based on their codes.
  • Prompt Creation: I designed a custom prompt template for the LLM, ensuring analysis of trends over at least five years of historical data.
  • Prediction Generation: The financial data and prompts are passed to OpenAI's GPT-4 model, which generates earnings predictions for different years, including trend analysis, key financial ratios, and reasoning behind the predictions.

Sample Outputs

Prompt Used

Prompt Used

Key Findings

The main insight from this project was how prompt structure and data preparation materially influence financial reasoning quality in LLMs. Working with multi-year financial statements highlighted the sensitivity of model outputs to accounting consistency, normalization, and context length. The results suggest LLMs can extract meaningful financial signals, but only when supported by disciplined data pipelines and carefully constrained prompts.

Sample Outputs

'Trend Analysis: Over the past five years leading up to 2018, earnings have displayed significant volatility. There was steady growth from 2013 to 2016, peaking in 2016 at approximately 13,083,397. However, in 2017, earnings sharply declined to 7,850,504 before rebounding in 2018 to 11,377,427. The fluctuations are influenced by underlying operational performance and tax expenses, notably the significant tax burden in 2017, which likely contributed to the drop that year.'

'Ratio Analysis: Financial ratios over the past five years reveal a mixed picture. The current ratio has shown improving liquidity from 2017 to 2018. Meanwhile, the leverage ratio increased slightly due to rising total liabilities compared to equity, reflecting higher financial risk. Profit margins have been under pressure, reflected in the swing of earnings and operational margins due to volatile expenses and finance costs. Asset turnover showed improvement until 2018, indicating efficient asset use despite earnings volatility.'

'Rationale: Considering the mixed trend in earnings with recent recovery and moderate growth in sales, future earnings are expected to stabilize but may not exceed prior highs owing to leverage and possible finance cost constraints. The notable improvement from 2017 to 2018 suggests resilience, but the potential for disruptions remains. Thus, a cautious outlook is forecasted for 2019.
Direction ||| increase ||| Magnitude ||| moderate ||| Confidence ||| 0.65'

2. Decentralized Consórcio

Project Link

Objective

This was a proof of concept to create an onchain equivalent the traditional Brazilian consórcio product. The goal was to use smart contracts to automate the process and benefit from blockchain benefits. is a blockchain-based version of the traditional Brazilian consórcio.

Description

In summary is a decentralized group savings scheme where participants contribute monthly payments to a pool, and one or more participants are selected to receive the pooled funds each month. This model leverages smart contracts to automate the process, ensuring transparency, security, and fairness without intermediaries. I ended up deploying the contract on LACHAIN Testnet, mainly because they were sponsoring the Blockchain Rio conference. I never got to testing if the contract actually worked but was able to deploy and verify it onchain (Contract on explorer).

Sample Outputs

Deployed Contract

Deployed Contract

Key Findings

This proof of concept illustrated how traditional financial coordination problems can be reduced through smart contract automation. The project surfaced practical gaps between theoretical protocol design and real-world deployment, particularly around testing rigor, user incentives, and contract safety. It reinforced the importance of tooling, test coverage, and threat modeling when moving from concept to production-ready decentralized systems.

3. Replicating VIX (US Market Volatility Index) for Brazil

Project Link

Objective

In this project, I worked on creating a VIX equivalent for the Brazilian market, starting with no knowledge of B3's data structure. The process was full of challenges, like dealing with messy and incomplete data, which didn't follow the clean examples I found on reference textbooks. But instead of getting stuck on these issues, I focused on finding ways to work around them.

Description

One of the biggest hurdles was adapting the VIX methodology to Brazil's market, where data is harder to come by and often inconsistent. I had to get creative with how I validated my results and handled the gaps. There were no ready-made solutions or benchmarks, so I had to troubleshoot and figure things out on my own. The project prioritized methodological robustness over theoretical purity, focusing on producing usable volatility signals under real-world data constraints.

Steps

  • Obtained Options Data: I used an API to pull options chain data and stored it in a PostgreSQL database.
  • Daily Data Processing: Each day, I queried the database to retrieve the latest options chains.
  • Methodology Adaptation: I selected options adapting the methodology for the data I had.
  • Daily VIX Calculation: I calculated and plotted the daily VIX (future volatility) levels.
  • Actual Volatility Calculation: I downloaded Ibovespa prices to calculate actual volatility and compared it with my index estimates.

Sample Outputs

Actual Volatility

Actual Volatility

Predicted Volatility vs Actual Volatility (30 days)

Predicted Volatility vs Actual Volatility (30 days)

Key Findings

This work demonstrated that market microstructure and data availability materially affect the applicability of financial indices across geographies. Approximations and validation heuristics proved more valuable than strict adherence to textbook formulas, highlighting how financial engineering often requires pragmatic compromises to remain operationally useful.

4. Agents Orchestrated Fund

Project Link

Objective

An adaptation of virattt's hedge-fund-agent-team, modified to analyze Brazilian market stocks using BRAPI API. The project implements a multi-agent system where each agent specializes in different aspects of financial analysis.

Description

The following diagram displays how the workflow works after prompted by the user. Data source is the BRAPI API.

Sample Outputs

System Workflow Diagram

System Workflow Diagram

Prompt

Prompt

Sample Analysis Output

Sample Analysis Output

Final Investment Analysis

Final Investment Analysis

Key Findings

This project highlighted the strengths and limitations of multi-agent orchestration for financial analysis. While agent specialization improved modular reasoning and interpretability, the system remained sensitive to prompt design, data freshness, and coordination overhead. The results suggest that agent-based architectures are most effective when used as analytical copilots rather than fully autonomous decision-makers.

5. DELOS – Blockchain-based Oracle & Tokenized Securities

Project Link

Objective

DELOS is a blockchain-based oracle and tokenized securities system exploring infrastructure for Brazilian macroeconomic data on-chain. The project demonstrates how tokenized debentures could leverage real-time BCB rates through smart contracts, factory patterns, and automated backend services.

Description

DELOS is an explorational blockchain platform demonstrating how Brazilian tokenized debentures could leverage on-chain macroeconomic data. The project implements a comprehensive oracle system that brings six critical BCB (Banco Central do Brasil) rates—IPCA, CDI, SELIC, PTAX, IGP-M, and TR—onto Arbitrum Sepolia testnet with Chainlink AggregatorV3 compatibility.

The smart contract architecture includes three main components: a BrazilianMacroOracle contract with circuit breakers, a BrazilianDebentureCloneable implementation supporting five indexation types (PRE, DI, IPCA, etc.), and a DebentureCloneFactory using EIP-1167 minimal proxies to reduce deployment costs by ~98%.

The system is deployed on Arbitrum Sepolia with the Oracle and Factory contracts verified on-chain.

Steps

  • Oracle Development: Built a Chainlink-compatible oracle delivering 6 critical BCB macroeconomic rates to Arbitrum Sepolia.
  • Smart Contract Architecture: Implemented ERC-1404 compliant debentures with EIP-1167 minimal proxies to reduce gas costs by ~98%.
  • Backend Automation: Developed a Python service for automated daily rate fetching and anomaly detection.
  • Integration: Created a Next.js dashboard with RainbowKit for real-time rate monitoring and debenture management.

Key Findings

This project highlights how traditional fixed-income mechanics translate into on-chain systems. Oracle design emphasized the importance of data validation, circuit breakers, and update cadence when financial calculations depend on external data. The debenture contracts exposed practical trade-offs between regulatory compliance (ERC-1404 restrictions, KYC whitelists) and composability, while the EIP-1167 factory showed how deployment architecture directly affects economic feasibility. Overall, the work demonstrates that infrastructure choices, not financial logic alone, determine the viability of tokenized securities.

Sample Outputs

┌─────────────────────────────────────────────────────────────┐
│                    BCB API Data Sources                      │
│  (IPCA, CDI, SELIC, PTAX, IGP-M, TR)                        │
└─────────────────────────────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────┐
│              Backend (Python FastAPI + APScheduler)          │
│  • BCB Client (httpx, retry logic, validation)              │
│  • Oracle Updater (Web3, batch updates)                     │
│  • Scheduler (daily/monthly jobs)                           │
│  • REST API (10 endpoints)                                  │
│  • SQLite (data versioning, anomaly detection)              │
└─────────────────────────────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────┐
│           Smart Contracts (Solidity 0.8.28)                 │
│  ┌────────────────────────────────────────────┐             │
│  │      BrazilianMacroOracle                  │             │
│  │  • 6 rates (8 decimal precision)           │             │
│  │  • Chainlink AggregatorV3 compatible       │             │
│  │  • Circuit breakers & validation           │             │
│  └────────────────────────────────────────────┘             │
│                      │                                       │
│                      ▼                                       │
│  ┌────────────┐  ┌──────────────────┐  ┌────────────────┐  │
│  │Debenture   │◄─│ BrazilianDeben-  │◄─│DebentureClone- │  │
│  │Implement.  │  │ tureCloneable    │  │Factory (6.7KB) │  │
│  │(ERC-1404)  │  │  (EIP-1167)      │  │                │  │
│  └────────────┘  └──────────────────┘  └────────────────┘  │
└─────────────────────────────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────┐
│        Frontend (Next.js 14 + RainbowKit + wagmi)           │
│  • Oracle Dashboard (real-time rates)                       │
│  • Debenture Issuance UI (validation, confirmation)         │
│  • Portfolio Management (balances, coupons, history)        │
└─────────────────────────────────────────────────────────────┘