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

Performance

DOCN vs. CGNX - Performance Comparison

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

Loading charts...

Returns By Period

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


DOCN

1D
-2.47%
1M
7.07%
YTD
254.20%
6M
257.62%
1Y
504.40%
3Y*
53.92%
5Y*
32.73%
10Y*

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%
*Multi-year figures are annualized to reflect compound growth (CAGR)

DOCN vs. CGNX - Yearly Performance Comparison


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

Correlation

The correlation between DOCN and CGNX 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 DOCN and CGNX shifts across timeframes, from 0.36 (1 year) to 0.48 (5 years), reflecting how their relationship changes across market environments.

Fundamentals

Market Cap

DOCN:

$19.07B

CGNX:

$10.71B

EPS

DOCN:

$2.42

CGNX:

$0.84

PE Ratio

DOCN:

70.53

CGNX:

75.32

PS Ratio

DOCN:

18.91

CGNX:

10.26

PB Ratio

DOCN:

21.50

CGNX:

7.24

Total Revenue (TTM)

DOCN:

$948.63M

CGNX:

$1.05B

Gross Profit (TTM)

DOCN:

$554.86M

CGNX:

$712.01M

EBITDA (TTM)

DOCN:

$373.00M

CGNX:

$224.08M

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

DOCN vs. CGNX — Risk / Return Rank

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

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

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

DOCN vs. CGNX - Risk-Adjusted Trends Comparison

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


DOCNCGNXDifference
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.66

1.42

+0.24

Calmar ratioReturn relative to maximum drawdown

21.10

3.95

+17.16

Martin ratioReturn relative to average drawdown

63.88

8.88

+55.01

DOCN vs. CGNX - Sharpe Ratio Comparison

The current DOCN Sharpe Ratio is 6.24, which is higher than the CGNX Sharpe Ratio of 1.89. The chart below compares the historical Sharpe Ratios of DOCN and CGNX, 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

DOCN vs. CGNX - Drawdown Comparison

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


Loading charts...

Drawdown Indicators


DOCNCGNXDifference

Max Drawdown

Largest peak-to-trough decline

-84.78%

-83.71%

-1.07%

Max Drawdown (1Y)

Largest decline over 1 year

-24.11%

-27.86%

+3.75%

Max Drawdown (3Y)

Largest decline over 3 years

-60.28%

-59.98%

-0.30%

Max Drawdown (5Y)

Largest decline over 5 years

-84.78%

-74.07%

-10.71%

Max Drawdown (10Y)

Largest decline over 10 years

-74.63%

Current Drawdown

Current decline from peak

-5.57%

-30.01%

+24.44%

Average Drawdown

Average peak-to-trough decline

-58.89%

-37.51%

-21.38%

Ulcer Index

Depth and duration of drawdowns from previous peaks

7.95%

12.36%

-4.41%

Volatility

DOCN vs. CGNX - Volatility Comparison

DigitalOcean Holdings, Inc. (DOCN) has a higher volatility of 17.94% compared to Cognex Corporation (CGNX) at 14.66%. This indicates that DOCN's price experiences larger fluctuations and is considered to be riskier than CGNX based on this measure. The chart below showcases a comparison of their rolling one-month volatility.


Loading charts...

Volatility by Period


DOCNCGNXDifference

Volatility (1M)

Calculated over the trailing 1-month period

17.94%

14.66%

+3.28%

Volatility (6M)

Calculated over the trailing 6-month period

61.13%

42.71%

+18.42%

Volatility (1Y)

Calculated over the trailing 1-year period

81.58%

58.31%

+23.27%

Volatility (5Y)

Calculated over the trailing 5-year period, annualized

71.32%

43.64%

+27.68%

Volatility (10Y)

Calculated over the trailing 10-year period, annualized

70.58%

41.91%

+28.67%

Dividends

DOCN vs. CGNX - Dividend Comparison

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


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

DOCN vs. CGNX - Financials Comparison

This section allows you to compare key financial metrics between DigitalOcean Holdings, Inc. and Cognex Corporation. 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
257.91M
268.44M
(DOCN) Total Revenue
(CGNX) Total Revenue
Values in USD except per share items

DOCN vs. CGNX - Profitability Comparison

The chart below illustrates the profitability comparison between DigitalOcean Holdings, Inc. and Cognex Corporation 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
56.1%
71.1%
Portfolio components
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 - 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 - 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 - 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 - 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%.

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


Frequently Asked Questions


DOCN and CGNX 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, DOCN dropped -84.78% vs CGNX's -83.71%.

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 DOCN and CGNX

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