PortfoliosLab logoPortfoliosLab logo
TREX vs. MSFT
Performance
Return for Risk
Drawdowns
Volatility
Dividends
Financials

Performance

TREX vs. MSFT - Performance Comparison

The chart below illustrates the hypothetical performance of a $10,000 investment in Trex Company, Inc. (TREX) and Microsoft Corporation (MSFT). The values are adjusted to include any dividend payments, if applicable.

Loading charts...

Returns By Period

In the year-to-date period, TREX achieves a 29.25% return, which is significantly higher than MSFT's -22.33% return. Over the past 10 years, TREX has underperformed MSFT with an annualized return of 15.86%, while MSFT has yielded a comparatively higher 23.85% annualized return.


TREX

1D
-2.28%
1M
15.72%
YTD
29.25%
6M
28.77%
1Y
-17.92%
3Y*
-9.21%
5Y*
-14.76%
10Y*
15.86%

MSFT

1D
1.80%
1M
-10.66%
YTD
-22.33%
6M
-22.85%
1Y
-22.44%
3Y*
4.54%
5Y*
7.88%
10Y*
23.85%
*Multi-year figures are annualized to reflect compound growth (CAGR)

TREX vs. MSFT - Yearly Performance Comparison


2026 (YTD)202520242023202220212020201920182017
TREX
Trex Company, Inc.
29.25%-49.18%-16.62%95.58%-68.65%61.29%86.29%51.42%9.53%68.31%
MSFT
Microsoft Corporation
-22.33%15.58%12.93%58.19%-28.02%52.48%42.53%57.56%20.80%40.73%

Correlation

The correlation between TREX and MSFT is 0.07, meaning there is essentially no relationship between their price movements. Each responds to its own set of market drivers, making them strong candidates for combining in a diversified portfolio.


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

0.07

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

0.24

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

0.37

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

0.38

Correlation (All Time)
Calculated using the full available price history since Apr 8, 1999

0.30

Over the past year, the correlation between TREX and MSFT has dropped to 0.07 - well below their long-term average of 0.30, suggesting their price drivers have been diverging.

Fundamentals

Market Cap

TREX:

$4.77B

MSFT:

$2.78T

EPS

TREX:

$1.80

MSFT:

$16.79

PE Ratio

TREX:

25.24

MSFT:

22.27

PEG Ratio

TREX:

69.39

MSFT:

1.56

PS Ratio

TREX:

4.10

MSFT:

8.76

PB Ratio

TREX:

4.79

MSFT:

6.72

Total Revenue (TTM)

TREX:

$1.18B

MSFT:

$318.27B

Gross Profit (TTM)

TREX:

$461.26M

MSFT:

$217.41B

EBITDA (TTM)

TREX:

$308.51M

MSFT:

$200.96B

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

TREX vs. MSFT — Risk / Return Rank

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

TREX
TREX Risk / Return Rank: 3030
Overall Rank
TREX Sharpe Ratio Rank: 2727
Sharpe Ratio Rank
TREX Sortino Ratio Rank: 2929
Sortino Ratio Rank
TREX Omega Ratio Rank: 2828
Omega Ratio Rank
TREX Calmar Ratio Rank: 3232
Calmar Ratio Rank
TREX Martin Ratio Rank: 3434
Martin Ratio Rank

MSFT
MSFT Risk / Return Rank: 1212
Overall Rank
MSFT Sharpe Ratio Rank: 88
Sharpe Ratio Rank
MSFT Sortino Ratio Rank: 1111
Sortino Ratio Rank
MSFT Omega Ratio Rank: 1111
Omega Ratio Rank
MSFT Calmar Ratio Rank: 1717
Calmar Ratio Rank
MSFT Martin Ratio Rank: 1111
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.

TREX vs. MSFT - Risk-Adjusted Trends Comparison

This table presents a comparison of risk-adjusted performance metrics for Trex Company, Inc. (TREX) and Microsoft Corporation (MSFT). 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.


TREXMSFTDifference
Sharpe ratioReturn per unit of total volatility

+0.52

Sortino ratioReturn per unit of downside risk

+0.96

Omega ratioGain probability vs. loss probability

0.98

0.86

+0.12

Calmar ratioReturn relative to maximum drawdown

-0.32

-0.66

+0.34

Martin ratioReturn relative to average drawdown

-0.50

-1.32

+0.82

TREX vs. MSFT - Sharpe Ratio Comparison

The current TREX Sharpe Ratio is -0.35, which is higher than the MSFT Sharpe Ratio of -0.87. The chart below compares the historical Sharpe Ratios of TREX and MSFT, 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

TREX vs. MSFT - Drawdown Comparison

The maximum TREX drawdown since its inception was -90.53%, which is greater than MSFT's maximum drawdown of -69.38%. Use the drawdown chart below to compare losses from any high point for TREX and MSFT.


Loading charts...

Drawdown Indicators


TREXMSFTDifference

Max Drawdown

Largest peak-to-trough decline

-90.53%

-69.38%

-21.15%

Max Drawdown (1Y)

Largest decline over 1 year

-56.01%

-33.91%

-22.10%

Max Drawdown (3Y)

Largest decline over 3 years

-69.90%

-33.91%

-35.99%

Max Drawdown (5Y)

Largest decline over 5 years

-78.58%

-37.15%

-41.43%

Max Drawdown (10Y)

Largest decline over 10 years

-78.58%

-37.15%

-41.43%

Current Drawdown

Current decline from peak

-67.77%

-30.58%

-37.19%

Average Drawdown

Average peak-to-trough decline

-38.79%

-21.79%

-17.00%

Ulcer Index

Depth and duration of drawdowns from previous peaks

35.92%

17.08%

+18.84%

Volatility

TREX vs. MSFT - Volatility Comparison

Trex Company, Inc. (TREX) has a higher volatility of 14.63% compared to Microsoft Corporation (MSFT) at 11.34%. This indicates that TREX's price experiences larger fluctuations and is considered to be riskier than MSFT based on this measure. The chart below showcases a comparison of their rolling one-month volatility.


Loading charts...

Volatility by Period


TREXMSFTDifference

Volatility (1M)

Calculated over the trailing 1-month period

14.63%

11.34%

+3.29%

Volatility (6M)

Calculated over the trailing 6-month period

28.72%

22.94%

+5.78%

Volatility (1Y)

Calculated over the trailing 1-year period

51.29%

26.02%

+25.27%

Volatility (5Y)

Calculated over the trailing 5-year period, annualized

47.38%

26.79%

+20.59%

Volatility (10Y)

Calculated over the trailing 10-year period, annualized

46.48%

27.09%

+19.39%

Dividends

TREX vs. MSFT - Dividend Comparison

TREX has not paid dividends to shareholders, while MSFT's dividend yield for the trailing twelve months is around 0.95%.


PositionTTM20252024202320222021202020192018201720162015
MSFT
Microsoft Corporation
0.95%0.70%0.73%0.74%1.06%0.68%0.94%1.20%1.69%1.86%2.37%2.33%
TREX
Trex Company, 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

TREX vs. MSFT - Financials Comparison

This section allows you to compare key financial metrics between Trex Company, Inc. and Microsoft 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


0.0020.00B40.00B60.00B80.00B20222023202420252026
343.40M
82.89B
(TREX) Total Revenue
(MSFT) Total Revenue
Values in USD except per share items

TREX vs. MSFT - Profitability Comparison

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

Gross Margin
Operating Margin
Net Margin
Quarterly
Annual

20.0%30.0%40.0%50.0%60.0%70.0%20222023202420252026
40.5%
67.6%
Portfolio components
TREX - Gross Margin

Gross margin is calculated as gross profit divided by revenue. For the three months ending on Jun 2026, Trex Company, Inc. reported a gross profit of 139.02M and revenue of 343.40M. Therefore, the gross margin over that period was 40.5%.

MSFT - Gross Margin

Gross margin is calculated as gross profit divided by revenue. For the three months ending on Jun 2026, Microsoft Corporation reported a gross profit of 56.06B and revenue of 82.89B. Therefore, the gross margin over that period was 67.6%.

TREX - Operating Margin

Operating margin is calculated as operating income divided by revenue. For the three months ending on Jun 2026, Trex Company, Inc. reported an operating income of 83.51M and revenue of 343.40M, resulting in an operating margin of 24.3%.

MSFT - Operating Margin

Operating margin is calculated as operating income divided by revenue. For the three months ending on Jun 2026, Microsoft Corporation reported an operating income of 38.40B and revenue of 82.89B, resulting in an operating margin of 46.3%.

TREX - Net Margin

Net margin is calculated as net income divided by revenue. For the three months ending on Jun 2026, Trex Company, Inc. reported a net income of 61.40M and revenue of 343.40M, resulting in a net margin of 17.9%.

MSFT - Net Margin

Net margin is calculated as net income divided by revenue. For the three months ending on Jun 2026, Microsoft Corporation reported a net income of 31.78B and revenue of 82.89B, resulting in a net margin of 38.3%.


Frequently Asked Questions


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

TREX has higher volatility (14.63%) compared to MSFT (11.34%). In terms of maximum drawdown, TREX dropped -90.53% vs MSFT's -69.38%.

TREX currently has the higher Sharpe Ratio (-0.35 vs -0.87), 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 TREX and MSFT

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