Repository navigation
Charts and Analytics
The Analysis group in the sidebar has three screens: Performance, Risk and Allocation. They are built from stored history, so they get richer the longer Stockbar runs. History accumulates at the rate set by Settings → Refresh → Chart Data Collection and is backfilled where providers allow.
- Stored snapshots. Stockbar records price rows and portfolio snapshots as it refreshes. Core Data keeps them; only a bounded working set is held in memory.
- Live samples are memory-only and add no extra writes. Individual stock charts combine stored prices with them, merged by timestamp.
- Backfill. Missing history is requested from the market-data providers (Market Data and Python) or, when you have switched that route on, from Folync. A series comes from one source or the other: Folync and local points are never spliced into one series.
- Weekly thinning. About once a week Stockbar saves a copy of the database and thins old history, so the database does not grow without limit (3.5.0 notes: price rows older than 31 days to one per symbol per day, portfolio snapshots older than 90 days to one per day).
Performance shows one chart at a time.
What to chart. The Chart picker offers Portfolio Value, Portfolio Gains and each of your symbols.
Range. 1 Day, 1 Week, 1 Month, 3 Months, 6 Months, 1 Year, All Time or Custom. Custom shows Start Date and End Date pickers and keeps the end after the start.
Style. For an individual stock you can choose Line or Candlestick. Chart options has Grid lines, Gradient fill and Line width (1.0 to 3.0 pt); the last two apply to line charts.
On the 1 Day and 1 Week ranges the line chart draws nights and weekends narrow, so the hours that have prices fill the chart. Longer ranges are drawn to scale. Hover over a chart to read a point, and use the zoom controls to zoom in and out.
A label above the chart says where the series came from and, where it applies, its coverage. A series that cannot be loaded is labelled unavailable.
The candlestick view can overlay or add:
- SMA 20, SMA 50 and EMA 12
- Bollinger Bands (20 periods, 2 standard deviations)
- RSI (14 periods) and MACD
- Volume
- Grid lines and a Crosshair
Comparison Mode compares up to five stocks. Normalized (%) puts them on a common percentage scale so differently priced stocks can be read together.
Panels show metrics for the selected series and range. For the portfolio they include Total Return, Return %, Volatility, Sharpe Ratio, Max Drawdown, Win Rate, Ann. Return, VaR (95%) and the value Range, with a return analysis against your purchase price. For a single stock they show the current price, day change, period return, your position (units, average cost, market value, gain) and volatility. Where there is not enough history, the panel says Not enough history.
The export panel can filter points by value threshold or date range, select points, and save Export CSV, Export PDF or a Detailed Portfolio CSV, or only the selected points.
Risk works from stored portfolio history. Choose 1 Month, 3 Months, 6 Months, 1 Year or All Time, and Recalculate if you want to.
| Card | What it shows |
|---|---|
| Value at Risk Distribution | Potential losses at 95% Confidence ("1 in 20 days") and 99% Confidence ("1 in 100 days"). |
| Risk-Adjusted Performance | Sharpe Ratio (excess return per unit of total risk) and Sortino Ratio (excess return per unit of downside risk). |
| Maximum Drawdown Analysis | The largest peak-to-trough fall and how many trading days it took from peak to lowest point. Recovery time is not included. |
| Significant Drawdown Periods | The larger falls, each with its length. |
| Calculation Details | The date, range, what the figures are based on, the risk-free rate and the method. |
How the figures are made:
- Sharpe and Sortino use one 4% annual risk-free rate (introduced in 3.5.0, when risk figures changed).
- Value at risk is historical, annualised from daily returns that leave out buys and sells.
- Weekends are left out of daily returns, and missing observations are ignored rather than treated as zero.
- A figure that cannot be worked out is shown as a dash. The screen says how many days its figures rest on.
- With no stored history, the screen says No Historical Data Available. Leave Stockbar running and data accumulates. The 3.5.0 notes say Risk needs at least 20 trading days.
Allocation has a range switch (1 Month to All Time) and four parts.
- Sector Allocation. A chart and list of how your portfolio divides by sector. Holdings with no known sector appear as Unclassified and are left out of the diversification score.
- Diversification Analysis. A Diversification Score out of 100, Concentration Risk and recommendations. When too much of the portfolio is unclassified, the screen says diversification is unavailable.
- Correlation Summary and Correlation Insights. A correlation matrix built from stored prices, and the Highest Correlations (Risk) and Lowest Correlations (Diversification) pairs. It needs at least 20 common trading days for two or more holdings; a holding with too little shared history is left out and named.
- Performance Attribution. Click View Details for the contribution of individual stocks and sectors, and a time-weighted return set against the money-weighted one. It counts holdings opened or closed in the period and says which days it measured, and shows Return (excl. new money), Starting Value, Ending Value and Net Cash Flow.
Allocation, attribution and risk convert every position to one currency with current exchange rates. Until every position can be valued that way (for example before the first rate refresh), Allocation shows no sector data rather than a mixed or estimated split. Benchmarks and watchlist symbols are excluded from Allocation. If you hold fewer than two stocks, the screen says it needs at least two for correlation and sector analysis.
If you are using Folync, Allocation sector data can wait on Keychain access after an update: see Troubleshooting.
Home · Installation · Troubleshooting · FAQ · Release History · Source · Report an issue
This wiki describes Stockbar 3.8.2.
Using Stockbar
- Installation
- Getting Started
- Menu Bar
- Main Window
- Portfolio and Holdings
- Alerts
- Charts and Analytics
Data sources
Reference
- Settings Reference
- Updates and Channels
- Backups, Export and Import
- Privacy and Security
- Troubleshooting
- FAQ
- Release History
Developers