- tags
- #portfolio
- features
- portfolio, portfolio-holdings, portfolio-prices, portfolio-news
The portfolio example: what you hold, the companies behind it, and news on them. It's what an AI builds from the landing page's prompt, "Build me an app to track my portfolio: my holdings, what I paid, today's price, and tell me when a company I hold puts out news." Its sample data is in portfolio-samples.
To use it in your own project, ask your AI to import the portfolio example (the skill knows how): it copies this topic and the samples, and adds a card for it on your home page.
$class Company (
@key ticker: String,
@label name: String,
exchange: String,
commodity: String,
price: Number,
changePct: Number,
currency: String,
) @group("Portfolio")
$class Holding (
@key id: String,
company: <>Company,
account: String,
shares: Number,
avgCost: Number,
opened: Date,
@calc(shares * avgCost) cost: Number,
@calc(shares * company.price) value: Number,
@calc(value - cost) pl: Number,
@calc(if cost > 0 then pl / cost * 100 else 0) plPct: Number,
) @group("Portfolio")
$class News (
@key id: String,
company: <>Company,
date: Date,
@label headline: String,
kind: String,
) @group("Portfolio")