CGNX vs. XYZ
CGNX (Cognex Corporation) and XYZ (Block, Inc) are both stocks. Both are in the Technology sector — CGNX in Scientific & Technical Instruments, XYZ in Software - Infrastructure. Over the past 10 years, CGNX returned 12.44%/yr vs 22.86%/yr for XYZ. At a 0.45 correlation, their price movements are largely independent.
Performance
CGNX vs. XYZ - Performance Comparison
Loading charts...
Returns By Period
In the year-to-date period, CGNX achieves a 84.18% return, which is significantly higher than XYZ's 13.92% return. Over the past 10 years, CGNX has underperformed XYZ with an annualized return of 12.44%, while XYZ has yielded a comparatively higher 22.86% annualized return.
CGNX
- 1D
- 2.23%
- 1M
- 18.29%
- YTD
- 84.18%
- 6M
- 73.52%
- 1Y
- 124.18%
- 3Y*
- 5.93%
- 5Y*
- -2.62%
- 10Y*
- 12.44%
XYZ
- 1D
- -2.56%
- 1M
- 3.26%
- YTD
- 13.92%
- 6M
- 23.36%
- 1Y
- 20.06%
- 3Y*
- 5.33%
- 5Y*
- -18.91%
- 10Y*
- 22.86%
CGNX vs. XYZ - Yearly Performance Comparison
| 2026 (YTD) | 2025 | 2024 | 2023 | 2022 | 2021 | 2020 | 2019 | 2018 | 2017 | |
|---|---|---|---|---|---|---|---|---|---|---|
CGNX Cognex Corporation | 84.18% | 1.24% | -13.45% | -10.84% | -39.11% | -2.85% | 47.69% | 45.54% | -36.53% | 92.91% |
XYZ Block, Inc | 13.92% | -23.41% | 9.88% | 23.09% | -61.09% | -25.79% | 247.89% | 11.54% | 61.78% | 154.37% |
Correlation
The correlation between CGNX and XYZ is 0.26, which is low. Their price movements are largely independent, making them effective diversification partners.
| Correlation | |
|---|---|
Correlation (1Y) Calculated over the trailing 1-year period | 0.26 |
Correlation (3Y) Calculated over the trailing 3-year period | 0.40 |
Correlation (5Y) Calculated over the trailing 5-year period | 0.50 |
Correlation (10Y) Calculated over the trailing 10-year period | 0.46 |
Correlation (All Time) Calculated using the full available price history since Nov 20, 2015 | 0.45 |
The correlation between CGNX and XYZ shifts across timeframes, from 0.26 (1 year) to 0.50 (5 years), reflecting how their relationship changes across market environments.
Fundamentals
CGNX:
$11.13B
XYZ:
$44.31B
CGNX:
$0.84
XYZ:
$1.31
CGNX:
78.25
XYZ:
56.63
CGNX:
10.66
XYZ:
1.86
CGNX:
7.52
XYZ:
2.04
CGNX:
$1.05B
XYZ:
$24.48B
CGNX:
$712.01M
XYZ:
$11.01B
CGNX:
$224.08M
XYZ:
$2.42B
Compare stocks, funds, or ETFs
Search for stocks, ETFs, and funds for a quick comparison or use the comparison tool for more options.
Return for Risk
CGNX vs. XYZ — Risk / Return Rank
CGNX
XYZ
CGNX vs. XYZ - Risk-Adjusted Trends Comparison
This table presents a comparison of risk-adjusted performance metrics for Cognex Corporation (CGNX) and Block, Inc (XYZ). Risk-adjusted metrics are performance indicators that assess an investment's returns in relation to its risk, enabling a more accurate comparison of different investment options.
| CGNX | XYZ | Difference | |
|---|---|---|---|
Sharpe ratioReturn per unit of total volatility | 2.17 | 0.44 | +1.73 |
Sortino ratioReturn per unit of downside risk | 3.49 | 0.92 | +2.57 |
Omega ratioGain probability vs. loss probability | 1.47 | 1.12 | +0.35 |
Calmar ratioReturn relative to maximum drawdown | 4.38 | 0.51 | +3.87 |
Martin ratioReturn relative to average drawdown | 9.94 | 1.18 | +8.76 |
Data is calculated on a 1-year rolling basis and updated daily. The trend shows the change in the indicator over the past month. | |||
Loading charts...
Sharpe Ratios by Period
| CGNX | XYZ | Difference | |
|---|---|---|---|
Sharpe Ratio (1Y)Calculated over the trailing 1-year period | 2.17 | 0.44 | +1.73 |
Sharpe Ratio (5Y)Calculated over the trailing 5-year period | -0.06 | -0.32 | +0.26 |
Sharpe Ratio (10Y)Calculated over the trailing 10-year period | 0.30 | 0.41 | -0.11 |
Sharpe Ratio (All Time)Calculated using the full available price history | 0.28 | 0.32 | -0.03 |
Drawdowns
CGNX vs. XYZ - Drawdown Comparison
The maximum CGNX drawdown since its inception was -83.71%, roughly equal to the maximum XYZ drawdown of -86.08%. Use the drawdown chart below to compare losses from any high point for CGNX and XYZ.
Loading charts...
Drawdown Indicators
| CGNX | XYZ | Difference | |
|---|---|---|---|
Max DrawdownLargest peak-to-trough decline | -83.71% | -86.08% | +2.37% |
Max Drawdown (1Y)Largest decline over 1 year | -27.86% | -39.48% | +11.62% |
Max Drawdown (3Y)Largest decline over 3 years | -59.98% | -52.96% | -7.02% |
Max Drawdown (5Y)Largest decline over 5 years | -74.07% | -86.08% | +12.01% |
Max Drawdown (10Y)Largest decline over 10 years | -74.63% | -86.08% | +11.45% |
Current DrawdownCurrent decline from peak | -27.29% | -73.69% | +46.40% |
Average DrawdownAverage peak-to-trough decline | -37.52% | -40.96% | +3.44% |
Ulcer IndexDepth and duration of drawdowns from previous peaks | 12.27% | 16.95% | -4.68% |
Volatility
CGNX vs. XYZ - Volatility Comparison
Cognex Corporation (CGNX) has a higher volatility of 14.08% compared to Block, Inc (XYZ) at 11.76%. This indicates that CGNX's price experiences larger fluctuations and is considered to be riskier than XYZ based on this measure. The chart below showcases a comparison of their rolling one-month volatility.
Loading charts...
Volatility by Period
| CGNX | XYZ | Difference | |
|---|---|---|---|
Volatility (1M)Calculated over the trailing 1-month period | 14.08% | 11.76% | +2.32% |
Volatility (6M)Calculated over the trailing 6-month period | 41.55% | 35.37% | +6.18% |
Volatility (1Y)Calculated over the trailing 1-year period | 57.58% | 46.20% | +11.38% |
Volatility (5Y)Calculated over the trailing 5-year period, annualized | 43.44% | 59.94% | -16.50% |
Volatility (10Y)Calculated over the trailing 10-year period, annualized | 41.80% | 56.66% | -14.86% |
Dividends
CGNX vs. XYZ - Dividend Comparison
CGNX's dividend yield for the trailing twelve months is around 0.51%, while XYZ has not paid dividends to shareholders.
| Position | TTM | 2025 | 2024 | 2023 | 2022 | 2021 | 2020 | 2019 | 2018 | 2017 | 2016 | 2015 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
CGNX Cognex Corporation | 0.51% | 0.90% | 0.85% | 0.68% | 0.56% | 0.32% | 2.77% | 0.37% | 0.48% | 0.27% | 0.46% | 0.62% |
XYZ Block, Inc | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% | 0.00% |
Financials
CGNX vs. XYZ - Financials Comparison
This section allows you to compare key financial metrics between Cognex Corporation and Block, Inc. You can select fields from income statements, balance sheets, and cash flow statements to easily visualize and compare the financial health of both companies.
Total Revenue: Total amount of money received from sales and other business activities
CGNX vs. XYZ - Profitability Comparison
CGNX - Gross Margin
Gross margin is calculated as gross profit divided by revenue. For the three months ending on Jun 2026, Cognex Corporation reported a gross profit of 190.94M and revenue of 268.44M. Therefore, the gross margin over that period was 71.1%.
XYZ - Gross Margin
Gross margin is calculated as gross profit divided by revenue. For the three months ending on Jun 2026, Block, Inc reported a gross profit of 2.91B and revenue of 6.06B. Therefore, the gross margin over that period was 48.0%.
CGNX - Operating Margin
Operating margin is calculated as operating income divided by revenue. For the three months ending on Jun 2026, Cognex Corporation reported an operating income of 59.87M and revenue of 268.44M, resulting in an operating margin of 22.3%.
XYZ - Operating Margin
Operating margin is calculated as operating income divided by revenue. For the three months ending on Jun 2026, Block, Inc reported an operating income of -171.99M and revenue of 6.06B, resulting in an operating margin of -2.8%.
CGNX - Net Margin
Net margin is calculated as net income divided by revenue. For the three months ending on Jun 2026, Cognex Corporation reported a net income of 51.70M and revenue of 268.44M, resulting in a net margin of 19.3%.
XYZ - Net Margin
Net margin is calculated as net income divided by revenue. For the three months ending on Jun 2026, Block, Inc reported a net income of -308.68M and revenue of 6.06B, resulting in a net margin of -5.1%.
Frequently Asked Questions
CGNX and XYZ have a correlation of 0.26, meaning they provide meaningful diversification benefit when combined. Depending on your allocation goals, holding both could reduce overall portfolio risk.
CGNX has higher volatility (14.08%) compared to XYZ (11.76%). In terms of maximum drawdown, CGNX dropped -83.71% vs XYZ's -86.08%.
CGNX currently has the higher Sharpe Ratio (2.17 vs 0.44), meaning it's delivered slightly more return per unit of risk over the trailing 12 months. However, this ranking shifts over time - use the Risk/Return Score above for a more comprehensive view that combines Sharpe, Sortino, and other measures used by quantitative funds.
Find the right allocation for CGNX and XYZ
Add both to a portfolio and optimize allocations for your target — whether that's maximizing returns, minimizing drawdowns, or balancing risk across holdings.
Open Portfolio Optimizer