Introduction
Athena OS helps track your portfolio performance and metrics. In this tutorial, we'll use the freely available Yahoo! Finance API to generate reports and metrics, as well as review your front-end.
Installing Athena OS
Getting started is simple. Install Athena OS via pip (Python 3.10 or later required):
pip install athenaos
That's it — you now have access to the athenaos command-line tool and all its dependencies.
Setting Up Your Portfolio
We'll set up a dummy portfolio where you buy shares in Nvidia (listed on the NASDAQ) and BYD (listed on the Hong Kong Stock Exchange, HKSE). This will help show how to track your finances, convert money, and more.
Download the portfolio here.
Trades and other decisions are all tracked in Excel, so you can manually edit them. Each transaction has the following fields:
- SYMBOL — the ticker. Since we're using Yahoo! Finance, we'll stick to the conventions there, such as appending ".HK" for HKSE-listed companies.
- DATE AND TIME — the date and time of the transaction. You can include only the date, or a full time stamp like
2026-02-15T14:30:00-05:00 which includes the year, month, date, time, and timezone (-5 hours from GMT, in the case above). If you don't provide a time or time zone, we assume the time zone is New York-based, and that the transaction took place at 12pm.
- TRANSACTION TYPE — you can use one of these transaction types:
CASH_IN, CURRENCY_EXCHANGE, BUY, SELL, DIVIDEND, INTEREST, FEE, or CASH_OUT. We'll cover the first four in this tutorial.
- PRICE — the price paid per 1 unit of the ticker.
- QUANTITY — the quantity purchased.
- CURRENCY — the currency used.
First, let's deposit $25K USD into the account and spend half of it on Nvidia. Below are the values for the NVDA purchase at $190 at the start of the year.
| Symbol |
Date and Time |
Transaction Type |
Price |
Quantity |
Currency |
| n/a |
2026-01-01 |
CASH_IN |
1 |
25,000 |
USD |
| NVDA |
2026-01-05 |
BUY |
190 |
65 |
USD |
Next, suppose we converted USD to Hong Kong Dollars (HKD) and bought BYD (1211.HK) shares in early February. Those two transactions are below.
| Symbol |
Date and Time |
Transaction Type |
Price |
Quantity |
Currency |
| HKD |
2026-02-01 |
CURRENCY_EXCHANGE |
0.125 |
80,000 |
USD |
| 1211.HK |
2026-02-03 |
BUY |
90 |
800 |
HKD |
For currency conversions (CURRENCY_EXCHANGE), the SYMBOL is the target currency (e.g. "HKD") and the CURRENCY is the source currency (e.g., "USD"). The price is how much of the CURRENCY it costs to buy 1 unit of the target (SYMBOL) currency.
In the case above, we converted about $10K USD to 80,000 Hong Kong Dollars on February 1, then waited about 2 days to buy BYD.
You can download this basic portfolio as an Excel file.
Running Your First Report
Once you have the portfolio file, the rest is easy! To get your positions, run the following:
athenaos report first-portfolio.xlsx
You should see the following output. Note that depending on when you run this, the numbers will be different since we're pulling delayed market data from Yahoo! Finance.
athenaos report
โโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโ โโโโโโ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโ
โโโโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโโโโโโ
โโโโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
โโโ โโโ โโโ โโโ โโโโโโโโโโโโโโ โโโโโโโโโ โโโ
โโโ โโโ โโโ โโโ โโโโโโโโโโโโโโ โโโโโโโโ โโโ
ATHENA โ Agentic Toolkit for Holistic Economic Narratives and Analysis
โ This is an experimental investing toolkit. All ideas, research,
and analysis should be verified by a human. Nothing here should be
construed as investment advice.
Open Positions on 2026-02-25 21:12 EST
โโโโโโโโโโโณโโโโโโโโโโโณโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโ
โ โ โ Unit Price โ โ โ โ
โ โ โ (Book โ โ Book Value โ Market Value โ โ
โ Symbol โ Quantity โ Market) โ (USD) โ (USD) โ Gain/Loss % โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ NVDA โ 65 โ $190.00 โ โ $12,350.00 โ $12,711.40 โ +2.93% โ
โ โ โ $195.56 โ โ โ โ
โ 1211.HK โ 800 โ $11.52 โ โ $9,213.29 โ $9,986.18 โ +8.39% โ
โ โ โ $12.48 โ โ โ โ
โโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
Cash Balances
โโโโโโโโโโโโณโโโโโโโโโโโ
โ Currency โ Balance โ
โกโโโโโโโโโโโโโโโโโโโโโโฉ
โ HKD โ 8,000.00 โ
โ USD โ 2,650.00 โ
โโโโโโโโโโโโดโโโโโโโโโโโ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Summary โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Total Portfolio Value: $26,371.28 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Advanced Metrics
To get more advanced metrics, run this command instead:
athenaos metrics first-portfolio.xlsx
athenaos metrics
โโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโ โโโโโโ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโ
โโโโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโโโโโโ
โโโโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
โโโ โโโ โโโ โโโ โโโโโโโโโโโโโโ โโโโโโโโโ โโโ
โโโ โโโ โโโ โโโ โโโโโโโโโโโโโโ โโโโโโโโ โโโ
ATHENA โ Agentic Toolkit for Holistic Economic Narratives and Analysis
โ This is an experimental investing toolkit. All ideas, research,
and analysis should be verified by a human. Nothing here should be
construed as investment advice.
Portfolio Metrics Report - 2026-02-25 21:13 EST
Currency: USD | Risk-Free Rate: 5.00% | Confidence: 95%
Risk-Adjusted Return Metrics
โโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโณโโโโโโโโโโโโโ
โ Metric โ Daily โ Annualized โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Sharpe Ratio โ 0.0890 โ 1.7012 โ
โ Sharpe Ratio (DTB3) โ 0.0888 โ 1.4099 โ
โ Sortino Ratio โ 0.1561 โ 2.9829 โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโ
Alpha & Beta (vs Market Benchmarks)
โโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโณโโโโโโโณโโโโโโโโโ
โ Benchmark โ Alpha (Annual) โ Beta โ Rยฒ โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ S&P 500 (^GSPC) โ 23.72% โ 0.75 โ 23.25% โ
โ NASDAQ (^IXIC) โ 31.24% โ 0.63 โ 28.46% โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโดโโโโโโโโโ
Volatility Metrics
โโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโณโโโโโโโโโโโโโ
โ Metric โ Daily โ Annualized โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Total Volatility โ 0.96% โ 18.34% โ
โ Upside Volatility โ 0.96% โ 18.39% โ
โ Downside Volatility โ 0.64% โ 12.29% โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโดโโโโโโโโโโโโโ
Volatility Ratio (Down/Up): 0.6683 - More upside variability
Drawdown Metrics
โโโโโโโโโโโโโโโโโโโโณโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Metric โ Value โ Details โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Maximum Drawdown โ -4.46% โ Peak: 2026-02-01 โ Trough: 2026-02-05 โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Value at Risk (95% Confidence)
โโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโณโโโโโโโโโโโโโ
โ Metric โ Historical โ Parametric โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Value at Risk (VaR) โ -1.39% โ -1.48% โ
โ Conditional VaR (CVaR) โ -1.73% โ -1.73% โ
โโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโโโโ
Win Rate Metrics
โโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโ
โ Metric โ Closed Positions โ All Positions โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Win Rate โ No closed positions โ 100.0% โ
โ Total Positions โ 0 โ 2 โ
โ Winning โ 0 โ 2 โ
โ Losing โ 0 โ 0 โ
โ Breakeven โ 0 โ 0 โ
โ Average Win โ N/A โ $562.03 โ
โ Average Loss โ N/A โ N/A โ
โ Win/Loss Ratio โ N/A โ N/A โ
โ Total Gain/Loss โ $0.00 โ $1,124.06 โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Summary Insights โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ Good risk-adjusted returns (Sharpe > 1.0) โ
โ โ Low maximum drawdown (<10%) โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Using the Frontend
To launch the interactive frontend, run:
athenaos frontend first-portfolio.xlsx
This will take a few minutes to load data, but once it does, you'll be able to visit http://127.0.0.1:4770 on your computer and analyze your portfolio via widgets.
Next Steps
... and that's it! You can now review your metrics, run analyses via the frontend, and more. If you want to learn how to run more advanced features, check back on the site or visit our community!