top of page

Risk and Performance Analysis

  • Portfolio Historical Performance
    Initial question: Calculate the total portfolio PnL for each quarter of 2024. Present the results in a table showing portfolio start and end values, PnL and percent value growth per quarter. First follow-up question: Show a graph illustrating the percentage contribution of each quarter to the total annual PnL of the portfolio in 2024. Second follow-up question: What were the two best and two worst performing positions that contributed to my portfolio's PnL in 2024?
  • Portfolio Exposures to Factors
    Initial question: Compute the portfolio's exposure to the risk model style factors. Next, calculate the factor loadings for the 20 largest portfolio positions by absolute dollar value. Display the results as a heatmap using a two-colour contrast palette, with stocks ranked top to bottom by the absolute dollar value and style factors ranked left to right by their overall portfolio exposure. First follow-up question: Generate a bar chart comparing the factor exposures of the sub-portfolios formed by the long positions only and the short positions only. Include only the style factors where the absolute value of an exposure from one of the portfolios exceeds 5M. On the same graph for each style factor mark the total portfolio factor exposure. Second follow-up question: Create a scatter plot with portfolio symbol loadings to the Market Beta factor on the X-axis and the symbol daily return (in basis points) on the Y-axis. Colour the dots based on the position value, and scale the dot area according to the absolute value of the position.
  • Performance Attribution
    Initial question: Generate a YTD time series chart showing the return breakdown of my portfolio using a risk model, with the total return highlighted in a thicker line. First follow-up question: Now show a similar graph with detailed time series for just the sector factors. Select only those sector factors where the time series deviates to plus/minus 1% along the way. Second follow-up question: Redo this chart once again now showing my portfolio’s returns attributed to the individual style factors. Keep just the 2 top and the 2 bottom style factors ranked by their resulting cumulative returns.
  • Portfolio Risk Breakdown
    Initial question: Break down portfolio variance into contributions from each of the factor groups, the specific risk and the rest (cross-covariance between different factor groups), display as a bar chart ranking by contribution. First follow-up question: Now make a detailed breakdown for contributions to the portfolio variance from individual sector factors. Show a bar chart diagram ranking the sector factors by their percentage contribution to the total portfolio variance. Second follow-up question: Convert all portfolio long positions into short positions and vice versa. Compute the risk breakdown for this new portfolio and compare it with the original portfolio. Show the comparison results for the factor groups and the specific risk in a graphical form. This graph confirms portfolio variance is symmetric with respect to the sign of the position.
  • Factor Research
    Initial question: Plot the cumulative returns since start of 2020 for the following risk model factors: Quality, Momentum, Crowding, and Short Interest. First follow-up question: Now using their daily returns, plot their rolling 200 and 400 day day sharpe ratios (16 * avg return / volatility). Only focus on the Quality factor. Second follow-up question: How has the Quality factor performed 3 months after each of the last two US presidential elections (in 2020 and 2024)? Show the results on the same plot (there should be two time series and the x-axis should give the number of days after the election).
  • Dig Deeper with Follow-Up Queries
    NAPA also supports follow-up queries. If analysis is not produced correctly, follow-up queries can help by modifying the analysis to your liking. For example: ​ Base Query: "Show me my current notional exposure to each style factor" Follow-up Query: "Plot these factors on a bar chart, only showing the top 3 most impactful" ​ Follow-up Queries must: Be asked in the same chat as the original question to maintain context​ Be relevant to the original query Utilize the same tools as the original query Request some form of modification to the original base query ​ By asking follow-ups in this manner, you improve NAPA's ability to best assist with your research needs.
  • Ask Relevant Queries
    NAPA is built specifically for quantitative portfolio management. It does not handle generic, non-finance questions. Such questions are unsupported by design to prevent outputs that could be misleading. Good Query: “Show the portfolio daily returns of my book as histogram, since the start of the year” Bad Query: “Why did NVDA go up today?
  • Organize and Structure Your Query
    Here are some best practices for querying NAPA. A well formed query should include: ​​ ​ A clear request for analysis that corresponds with one of NAPA’s tools. ​ A defined time horizon for analysis. No requests for unsupported data (international equities, derivatives, historical data older than 50 years). The type of plot or graph desired, if applicable. Conciseness, as overly verbose queries increase the likelihood of misinterpretation by NAPA ​ Prompting with these criteria in mind helps NAPA best understand your intent and produce useful results.
  • Use Precise Terminology
    Clear, precise queries help NAPA understand your intent with better accuracy. For example the prompt: “Compute high-level attribution of portfolio returns to the risk model factor returns since the start of 2025. Show the results on a line graph” This query is high quality because it contains:​ A Precise Task - It clearly states the analysis type. A Precise Time Period - It specifies the exact time range. A Correct Understanding of Data - It respects and aligns with the available data. A Specific Plot Type - It clearly defines the intended chart or graph (in this case, a line graph). ​ Conversely, vague language may cause NAPA to produce imprecise or unhelpful results. Some examples include: Failing to state a clear objective Omitting a time range for analysis Significant typos or grammatical errors that obscure meaning Failing to specify the type of chart required, if applicable
  • What are the artifacts of an equity factor risk model?
    Equity factor risk models form a subclass of factor risk models that cater for the universe of common equity stocks (and, by continuation, on the combinations of these stocks, e.g. ETFs). These models differ primarily along two dimensions: The choice of the target universe of stocks. The model can be either a regional (e.g. focus only on the US market) or a global one. The selection and construction of the factors. The number of factors in a model can range from one (in a famous historical model CAPM where the single factor represented the market as a whole) and up to about 100 in the recent commercial models (e.g. Axioma, Barra). However, any of the above choices lead to a similar collection of data artifacts an equity risk model produces. Namely, consider a model with K factors created for a universe U that includes N stocks. Assume the stocks are indexed by i=1, ..., N. The model’s main idea is to represent the return ri of the stock i as a combination of the factor returns fk , k = 1, ..., K, and the specific return ui of this particular stock: The coefficient ik is the loading or betas of stocks i to the model factor k. Any similarities in the returns of two stocks are thus explained via covariances between the returns of the factors: The idiosyncratic returns ui are postulated to be independent from both factors and each other, hence the only have variances Overall, the equity risk model Organized in a K x K matrix Thus, the output of an equity factor risk model are as follows: Universe U of N stocks. K factors. A NK matrix of stock factor loadings with elements { ik }, i= 1, ..., N, k=1, ... , K A KK matrix of factor returns’ covariances {Ckl}, k,l = 1, ... , K A NN diagonal matrix of the stock specific return’ variances on the diagonal: {Vi}, i = 1, ... , N All of the above numbers are calibrated using the historical data. The model data produced today is valid for a short period of time. Once historical data is updated with the past days’ data, the model is re-calibrated to produce new matrices.
  • What is a factor risk model?
    A figure like a 1% daily risk for a portfolio emerges from a portfolio risk model. Any portfolio risk model feeds off the historical price data for the universe of assets it covers. Even with a single asset, given all the historical prices, the modeling process involves multiple decisions: determining the appropriate historical window, choosing whether to weight all historical prices equally or to emphasize more recent observations, etc. Extending a model to a market encompassing thousands of actively traded assets (e.g. Russel 3000 index of US stocks) increases the complexity multifold. Moreover, as already mentioned above (see q.1), the asset prices are interdependent. For example, one can naturally expect the synchronous ups and downs of stocks from the same industry sector. Hence capturing pairwise relationships becomes paramount. This raises the complexity of the problem even further: 1K assets lead to 500K different entries in the asset-to-asset covariance matrix. A common strategy to manage the described complexity is to postulate a simplification by nominating a reasonable number of common drivers, or factors, that shape portfolio risk. All other risk sources are declared to be specific to individual assets only, with no remaining common trends. The total portfolio risk thus splits into a factor risk and a specific risk (also called idiosyncratic risk) components.
  • What is a risk attribution?
    Once again, consider an example of a portfolio worth $1M for which a risk model gives the daily portfolio risk of $10K. If the majority of this risk comes from common sources, i.e. the model factors, the portfolio returns would be driven mostly by these factors. Portfolio manager can, in theory, hedge away this factor risk. If, however, the portfolio risk is mostly idiosyncratic, then this portfolio is almost ideally hedged. The return of this portfolio won’t depend on the market trends and currents, but mostly on how the selected portfolio stocks perform relative to those trends. Portfolio risk attribution denotes the analytical process of decomposing portfolio returns into contributions derived from systematic factors and idiosyncratic, asset-specific sources. In practice, managers tend to specialize in one of these dimensions rather than pursuing simultaneous optimization of both. For instance, fundamental managers frequently focus on generating stock-specific returns, whereas macro discretionary investors may emphasize market timing or the capture of factor premiums. Nevertheless, adopting a risk attribution mindset can offer substantial benefits to any portfolio manager.
  • What are the typical factors of Fundamental Equity Risk Models?
    Contemporary equity risk models like Axioma would include the following factor types: Market or Market Intercept factor encompasses the overall market behaviour. It will be mostly statistically significant of all model factors. Industry factors are formed via mapping each stock in the universe to one or more industries within the market. The mappings can use universally adopted schemes like GICS or those invented by model providers. Style factors capture the behaviour on the asset level, net of market trends. The exposures to style factors are derived from the mixture of market and fundamental data (stock returns, trading volumes, company balance sheet, etc.). Models covering more than one market include country factors to distinguish individual markets within the universe. Where the model universe covers countries with different currencies, models can include currency factors to capture the interplay between the local currencies and the base currency.
  • Why is a comprehensive understanding of factor exposure critical for fundamental investors?
    Fundamental risk models are commonly used by fundamental investors because they offer clarity and interpretability. Their beauty lies in the fact that the factors are anchored in well-established economic patterns and investor behavior, providing both intuition and meaningful insights into market dynamics. Factor returns serve as cross currents in the market, introducing turbulence into investment decisions. Significant factor rotations—characterized by unusually large drawdowns or runups in factors such as momentum, value, or growth—can trigger portfolio drawdowns and may necessitate decisive action. A thorough understanding of factor returns facilitates precise diagnostics and adaptive strategies when market conditions deviate from expectations—a scenario that occurs rather frequently. By dissecting the granular drivers of portfolio performance, portfolio managers can achieve more stable and consistent returns compared to those who inadvertently assume unintended exposures to risk factors.
  • What are the factors of an equity risk model?
    There are three generic approaches for factor construction. The time-series approach makes factors from observable data of some activity that affects the economy. It can range from the prices of another asset class, e.g. oil or gold, or it can be an external influence like weather data. Once this time series data is collected, mathematical methods can be applied to regress the stock prices onto it. This regression yields the betas. Fundamental approach aims to convert macroeconomic concepts into factors by quantifying what the stock betas should be. Once the betas for a factor are defined, the factor can be physically represented by a modelled factor-mimicking portfolio. The latter allows modellers to compute the factor returns. This approach requires extensive data for calibration, but the result rewards a practitioner with significant interpretability. Fundamental models link the factor portion of the portfolio risk to meaningful concepts like Value, Size, Momentum, Growth, etc. Statistical approach employs purely statistical machinery to extract both the factors and the betas from the time series of stock returns. Techniques like principal component analysis extract the dominant eigenvectors of the stock returns’ covariance matrix. The top N eigenvectors are selected as model factors—with the first often representing the overall market—while the remaining N-1 factors typically lack a clear macroeconomic interpretation. Essentially, these remaining factors can be seen as blended manifestations of various fundamental influences, albeit without precise attribution. This approach requires less data but it comes at the expense of reduced transparency in the risk decomposition. None of three approaches dominates the other. Contemporary risk models tend to mix and match them in various ways. In the initial stages of model estimation, a wide range of candidate factors is typically generated. These candidates are subsequently refined into an optimal subset based on several criteria, including data availability, conceptual clarity, and empirical performance. Each factor must demonstrate statistical significance and account for a substantial portion of the variability in returns of the model universe assets.
  • What is Portfolio Risk?
    The total value of every portfolio of assets evolves over time as the asset prices experience fluctuations. Although each asset follows its own distinct price path, in practice their movements are interdependent. Assets frequently exhibit co-movement patterns, especially when they share common economic influences or industry-specific relations. This interconnected behavior reflects deeper market dynamics, where systemic forces and shared fundamentals drive collective shifts across asset groups. Portfolio risk, at its core, quantifies the potential deviation of a portfolio’s value from its current level over a specified time horizon. Whether one considers a daily, monthly, or annual horizon, this metric offers insight into the magnitude of possible price fluctuations. For example, a portfolio valued at 1 million dollars with a daily risk of 1% implies a typical day-to-day fluctuation of approximately 10,000 dollars, either upward or downward. Although this measure is inherently symmetric—capturing both gains and losses—investors tend to exhibit a heightened sensitivity to potential downside moves.
  • Scatter Plots
    On a scatter plot, show the daily returns of MSFT on the Y-axis and the returns of XOM on the X-axis since January 1 2024. Also display the regression line, the R2 and the T-Stat to the plot
  • Treemap Chart
    In a treemap chart, plot my portfolio notional value by sector
  • Pie Charts
    Group my portfolio by sectors and plot the sector-wise holdings on a pie chart
  • Time Series Charts
    How has the Crowding factor performed 3 months after each of the last 5 US presidential elections. Show the results on the same time series chart (x-axis should be num days after the election)
  • Bubble Charts
    Generate a bubble chart showing the relationship between expected return and risk for all stocks in the portfolio. Use annualized volatility calculated over the past 5 years as the x-axis and annualized expected return (based on the last 5 years of returns) as the y-axis. The bubble size should represent market capitalization, scaled appropriately. Color the bubbles based on sector classification.
  • Plot Annotations
    Plot my portfolio returns ytd and mark each drawdown >5% with red Xs
  • Histogram
    Plot a histogram of the returns of MSFT YTD
  • Bar Charts
    Show a bar chart with all my factor exposures, sorted and colored by risk category/group
  • Heatmaps
    In a heatmap, show the exposure of each stock in my portfolio to style factors
  • Candlestick Charts
    On a candlestick chart, plot the returns of my portfolio since the 2024 US Presidential Election
  • How do I know the responses are accurate?
    NAPA is constantly improving, and thanks to the proprietary, multi-agent system, it can already answer highly complex questions accurately. We do recommend quickly verifying responses, as no AI model is perfect.
  • Is my financial data secure?
    Yes. Newcortex takes data security very seriously, and our team has leading edge ML engineers and researchers, as well as Wall Street professionals implementing best in class data security into our system.
  • What types of questions can I ask NAPA?
    Anything you can think of! NAPA has access to our proprietary library of quantitative analysis tools, and can even modify these tools to answer more complex, compound requests. Some examples include: What is my portfolio gain or loss over the past month? Plot a pie chart of my portfolio What happened in my portfolio last week?
  • What if NAPA produces a suspect response?
    While NAPA is an incredibly advanced AI system, it is not yet perfect. We recommend sanity checking the outputs, and we welcome your feedback on unsatisfactory answers so we can improve over time.
bottom of page