Skip to content

TimHanewich/MIRA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

189 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIRA logo

MIRA: Market Intelligence & Research Agent

Mira is an autonomous investing research agent that researches the market, develops investing and trading strategies and manages a persistent paper portfolio.

screenshot

MIRA behaves as an autonomous analyst:

  1. Wake: wakes up with a portfolio to manage,
  2. Context: reviews its prior journal entries to recover context
  3. Researches: researches market developments, earnings call transcripts, financials, etc.
  4. Trades: makes simulated buy/sell decisions
  5. Saves: logs its strategy reasoning, saves state, goes back to sleep.

process

MIRA's Tools

MIRA is given a toolset it can use to inspect its portfolio, gather information, make simulated trades, and record its reasoning.

Portfolio and trading tools

  • view_portfolio: opens the current simulated portfolio, including holdings, values, and cash balance
  • quote: gets the latest quote and daily move for a symbol
  • buy: buys shares inside the simulated portfolio
  • sell: sells shares inside the simulated portfolio

Memory and continuity tools

  • open_journal: lists the dates for which prior journal entries exist
  • read_journal: reads journal entries from a selected day
  • log_journal: writes a new investment journal entry so the agent can explain its thinking to its future self

Research tools

  • web_search (built in): searches the web for current company, sector, and market information
  • read_earnings_call_transcript: reads earnings call transcripts
  • get_cik: resolves a stock ticker to the company's SEC CIK
  • search_financial_data: searches available SEC XBRL facts for a company
  • get_financial_data: retrieves historical datapoints for a specific reported SEC fact

Utility tools

  • calculate: evaluates math expressions for sizing, comparison, and quick analysis

MIRA Modes

When you start the app, MIRA offers four entry points:

1. Schedule MIRA for Automated Investments
2. Run MIRA Now: Autonomous Mode
3. Run MIRA Now: Assistant Mode
4. Review Portfolio

1. Schedule MIRA for Automated Investments

Runs MIRA on a recurring schedule on weekdays at 3:00 PM Eastern to make trades before market closes.

2. Run MIRA Now: Autonomous Mode

This is the core experience. MIRA wakes up, reviews context, researches, decides whether to trade, logs its reasoning, saves state, and shuts down.

3. Run MIRA Now: Assistant Mode

A guided chat mode where you can interact with the agent directly. Type /save to persist state and close the session.

4. Review Portfolio

Builds a dashboard of the current simulated portfolio, including:

  • cash balance
  • holdings value
  • allocation by symbol
  • daily move
  • cost basis
  • unrealized gain/loss
  • cumulative input/output token consumption

Getting started

1. Prerequisites

You will need:

  • .NET 10 SDK
  • Python 3
  • a model deployment accessible through Azure AI Foundry / compatible endpoint
  • an API key and model name for that deployment

2. Start the local quote server

Install the Python dependencies and run the included server:

pip install flask yfinance
python src\yfinance-server.py

By default, MIRA expects that service to be available at http://localhost:8080.

3. Create your settings file

MIRA reads settings from:

%LOCALAPPDATA%\MIRA\settings.json

Example:

{
  "FoundryEndpoint": "https://your-resource.openai.azure.com/",
  "FoundryApiKey": "YOUR_API_KEY",
  "FoundryModel": "your-model-name"
}

4. Run the app

dotnet run --project src\MIRA.csproj

Disclaimer

This project is for experimentation and software development purposes. It is not financial advice, and it does not execute real-money trades.

About

Autonomous investing research agent that researches the market, develops investing and trading strategies and manages a persistent paper portfolio.

Topics

Resources

License

Stars

Watchers

Forks

Contributors