PortfoliosLab logoPortfoliosLab logo
CGNX vs. DOCN
Performance
Return for Risk
Drawdowns
Volatility
Dividends
Financials

Performance

CGNX vs. DOCN - Performance Comparison

The chart below illustrates the hypothetical performance of a $10,000 investment in Cognex Corporation (CGNX) and DigitalOcean Holdings, Inc. (DOCN). The values are adjusted to include any dividend payments, if applicable.

Loading charts...

Returns By Period

In the year-to-date period, CGNX achieves a 77.29% return, which is significantly lower than DOCN's 254.20% return.


CGNX

1D
2.42%
1M
0.09%
YTD
77.29%
6M
78.93%
1Y
109.31%
3Y*
4.67%
5Y*
-3.85%
10Y*
12.63%

DOCN

1D
-2.47%
1M
7.07%
YTD
254.20%
6M
257.62%
1Y
504.40%
3Y*
53.92%
5Y*
32.73%
10Y*
*Multi-year figures are annualized to reflect compound growth (CAGR)

CGNX vs. DOCN - Yearly Performance Comparison


2026 (YTD)20252024202320222021
CGNX
Cognex Corporation
77.29%1.24%-13.45%-10.84%-39.11%2.77%
DOCN
DigitalOcean Holdings, Inc.
254.20%41.24%-7.14%44.05%-68.29%93.57%

Correlation

The correlation between CGNX and DOCN is 0.36, 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.36

Correlation (3Y)
Calculated over the trailing 3-year period

0.42

Correlation (5Y)
Calculated over the trailing 5-year period

0.48

Correlation (All Time)
Calculated using the full available price history since Mar 24, 2021

0.47

The correlation between CGNX and DOCN shifts across timeframes, from 0.36 (1 year) to 0.48 (5 years), reflecting how their relationship changes across market environments.

Fundamentals

Market Cap

CGNX:

$10.71B

DOCN:

$19.07B

EPS

CGNX:

$0.84

DOCN:

$2.42

PE Ratio

CGNX:

75.32

DOCN:

70.53

PS Ratio

CGNX:

10.26

DOCN:

18.91

PB Ratio

CGNX:

7.24

DOCN:

21.50

Total Revenue (TTM)

CGNX:

$1.05B

DOCN:

$948.63M

Gross Profit (TTM)

CGNX:

$712.01M

DOCN:

$554.86M

EBITDA (TTM)

CGNX:

$224.08M

DOCN:

$373.00M

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. DOCN — Risk / Return Rank

Compare risk-adjusted metric ranks to identify better-performing investments over the past 12 months.

CGNX
CGNX Risk / Return Rank: 8989
Overall Rank
CGNX Sharpe Ratio Rank: 8888
Sharpe Ratio Rank
CGNX Sortino Ratio Rank: 9191
Sortino Ratio Rank
CGNX Omega Ratio Rank: 9090
Omega Ratio Rank
CGNX Calmar Ratio Rank: 8989
Calmar Ratio Rank
CGNX Martin Ratio Rank: 8686
Martin Ratio Rank

DOCN
DOCN Risk / Return Rank: 9999
Overall Rank
DOCN Sharpe Ratio Rank: 9999
Sharpe Ratio Rank
DOCN Sortino Ratio Rank: 9898
Sortino Ratio Rank
DOCN Omega Ratio Rank: 9797
Omega Ratio Rank
DOCN Calmar Ratio Rank: 9999
Calmar Ratio Rank
DOCN Martin Ratio Rank: 100100
Martin Ratio Rank
The rank (0–100) shows how this investment's returns compare to the risk taken. Higher = better. Based on the past 12 months of data, combining Sharpe, Sortino, and other metrics used by quantitative funds and institutional investors.

CGNX vs. DOCN - Risk-Adjusted Trends Comparison

This table presents a comparison of risk-adjusted performance metrics for Cognex Corporation (CGNX) and DigitalOcean Holdings, Inc. (DOCN). 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.

Values are calculated on a 1-year rolling basis and updated daily. Risk-adjusted metrics are more stable over longer periods — use the period switch above to explore them.


CGNXDOCNDifference
Sharpe ratioReturn per unit of total volatility

-4.36

Sortino ratioReturn per unit of downside risk

-2.26

Omega ratioGain probability vs. loss probability

1.42

1.66

-0.24

Calmar ratioReturn relative to maximum drawdown

3.95

21.10

-17.16

Martin ratioReturn relative to average drawdown

8.88

63.88

-55.01

CGNX vs. DOCN - Sharpe Ratio Comparison

The current CGNX Sharpe Ratio is 1.89, which is lower than the DOCN Sharpe Ratio of 6.24. The chart below compares the historical Sharpe Ratios of CGNX and DOCN, calculated using daily returns over the previous 12 months. A higher Sharpe Ratio indicates better risk-adjusted performance relative to the risk-free rate.


Loading charts...

Drawdowns

CGNX vs. DOCN - Drawdown Comparison

The maximum CGNX drawdown since its inception was -83.71%, roughly equal to the maximum DOCN drawdown of -84.78%. Use the drawdown chart below to compare losses from any high point for CGNX and DOCN.


Loading charts...

Drawdown Indicators


CGNXDOCNDifference

Max Drawdown

Largest peak-to-trough decline

-83.71%

-84.78%

+1.07%

Max Drawdown (1Y)

Largest decline over 1 year

-27.86%

-24.11%

-3.75%

Max Drawdown (3Y)

Largest decline over 3 years

-59.98%

-60.28%

+0.30%

Max Drawdown (5Y)

Largest decline over 5 years

-74.07%

-84.78%

+10.71%

Max Drawdown (10Y)

Largest decline over 10 years

-74.63%

Current Drawdown

Current decline from peak

-30.01%

-5.57%

-24.44%

Average Drawdown

Average peak-to-trough decline

-37.51%

-58.89%

+21.38%

Ulcer Index

Depth and duration of drawdowns from previous peaks

12.36%

7.95%

+4.41%

Volatility

CGNX vs. DOCN - Volatility Comparison

The current volatility for Cognex Corporation (CGNX) is 14.66%, while DigitalOcean Holdings, Inc. (DOCN) has a volatility of 17.94%. This indicates that CGNX experiences smaller price fluctuations and is considered to be less risky than DOCN based on this measure. The chart below showcases a comparison of their rolling one-month volatility.


Loading charts...

Volatility by Period


CGNXDOCNDifference

Volatility (1M)

Calculated over the trailing 1-month period

14.66%

17.94%

-3.28%

Volatility (6M)

Calculated over the trailing 6-month period

42.71%

61.13%

-18.42%

Volatility (1Y)

Calculated over the trailing 1-year period

58.31%

81.58%

-23.27%

Volatility (5Y)

Calculated over the trailing 5-year period, annualized

43.64%

71.32%

-27.68%

Volatility (10Y)

Calculated over the trailing 10-year period, annualized

41.91%

70.58%

-28.67%

Dividends

CGNX vs. DOCN - Dividend Comparison

CGNX's dividend yield for the trailing twelve months is around 0.53%, while DOCN has not paid dividends to shareholders.


PositionTTM20252024202320222021202020192018201720162015
CGNX
Cognex Corporation
0.53%0.90%0.85%0.68%0.56%0.32%2.77%0.37%0.48%0.27%0.46%0.62%
DOCN
DigitalOcean Holdings, 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. DOCN - Financials Comparison

This section allows you to compare key financial metrics between Cognex Corporation and DigitalOcean Holdings, 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.


Quarterly
Annual

Total Revenue: Total amount of money received from sales and other business activities


100.00M150.00M200.00M250.00M300.00M20222023202420252026
268.44M
257.91M
(CGNX) Total Revenue
(DOCN) Total Revenue
Values in USD except per share items

CGNX vs. DOCN - Profitability Comparison

The chart below illustrates the profitability comparison between Cognex Corporation and DigitalOcean Holdings, Inc. over time, highlighting three key metrics: Gross Profit Margin, Operating Margin, and Net Profit Margin.

Gross Margin
Operating Margin
Net Margin
Quarterly
Annual

60.0%65.0%70.0%75.0%20222023202420252026
71.1%
56.1%
Portfolio components
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%.

DOCN - Gross Margin

Gross margin is calculated as gross profit divided by revenue. For the three months ending on Jun 2026, DigitalOcean Holdings, Inc. reported a gross profit of 144.71M and revenue of 257.91M. Therefore, the gross margin over that period was 56.1%.

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%.

DOCN - Operating Margin

Operating margin is calculated as operating income divided by revenue. For the three months ending on Jun 2026, DigitalOcean Holdings, Inc. reported an operating income of 36.57M and revenue of 257.91M, resulting in an operating margin of 14.2%.

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%.

DOCN - Net Margin

Net margin is calculated as net income divided by revenue. For the three months ending on Jun 2026, DigitalOcean Holdings, Inc. reported a net income of 33.22M and revenue of 257.91M, resulting in a net margin of 12.9%.


Frequently Asked Questions


CGNX and DOCN have a correlation of 0.36, meaning they provide meaningful diversification benefit when combined. Depending on your allocation goals, holding both could reduce overall portfolio risk.

DOCN has higher volatility (17.94%) compared to CGNX (14.66%). In terms of maximum drawdown, CGNX dropped -83.71% vs DOCN's -84.78%.

DOCN currently has the higher Sharpe Ratio (6.24 vs 1.89), 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.

Portfolio Optimizer

Find the right allocation for CGNX and DOCN

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