Overall Statistics |
Total Orders
50
Average Win
1.72%
Average Loss
-0.61%
Compounding Annual Return
0.501%
Drawdown
10.100%
Expectancy
0.837
Start Equity
100000
End Equity
113125.91
Net Profit
13.126%
Sharpe Ratio
-0.785
Sortino Ratio
-0.155
Probabilistic Sharpe Ratio
0.000%
Loss Rate
52%
Win Rate
48%
Profit-Loss Ratio
2.83
Alpha
-0.019
Beta
0.011
Annual Standard Deviation
0.023
Annual Variance
0.001
Information Ratio
-0.38
Tracking Error
0.159
Treynor Ratio
-1.612
Total Fees
$9.41
Estimated Strategy Capacity
$1000.00
Lowest Capacity Asset
AXR R735QTJ8XC9X
Portfolio Turnover
0.02%
|
# https://quantpedia.com/strategies/net-current-asset-value-effect/ # # The investment universe consists of all stocks on the London Exchange. Companies with more than one class of ordinary shares and foreign companies # are excluded. Also excluded are companies on the lightly regulated markets and companies which belong to the financial sector. The portfolio of # stocks is formed annually in July. Only those stocks with an NCAV/MV higher than 1.5 are included in the NCAV/MV portfolio. This Buy-and-hold # portfolio is held for one year. Stocks are weighted equally. # # QC implementation changes: # - Instead of all listed London stocks, we selected top 3000 US listed stocks by market cap from QC stock universe. from AlgorithmImports import * import numpy as np class NetCurrentAssetValueEffect(QCAlgorithm): def Initialize(self) -> None: self.SetStartDate(2000, 1, 1) self.SetCash(100_000) self.UniverseSettings.Leverage = 3 self.UniverseSettings.Resolution = Resolution.Daily self.AddUniverse(self.FundamentalFunction) self.Settings.MinimumOrderMarginPortfolioPercentage = 0.0 # Fundamental Filter Parameters self.fundamental_count: int = 3_000 self.market: str = 'usa' self.country_id: str = 'USA' self.fin_sector_code: int = 103 self.ncav_threshold: float = 1.5 self.long_symbols: List[Symbol] = [] self.rebalance_month: int = 7 self.selection_flag: bool = True self.exchange: Symbol = self.AddEquity('SPY', Resolution.Daily).Symbol self.Schedule.On(self.DateRules.MonthStart(self.exchange), self.TimeRules.AfterMarketOpen(self.exchange), self.Selection) def FundamentalFunction(self, fundamental: List[Fundamental]) -> List[Symbol]: if not self.selection_flag: return Universe.Unchanged filtered: List[Fundamental] = [f for f in fundamental if f.HasFundamentalData and f.Market == self.market and f.CompanyReference.CountryId == self.country_id and f.AssetClassification.MorningstarSectorCode != self.fin_sector_code and not np.isnan(f.EarningReports.BasicAverageShares.TwelveMonths) and f.EarningReports.BasicAverageShares.TwelveMonths != 0 and not np.isnan(f.MarketCap) and f.MarketCap != 0 and not np.isnan(f.ValuationRatios.WorkingCapitalPerShare) and f.ValuationRatios.WorkingCapitalPerShare != 0 ] sorted_by_market_cap: List[Fundamental] = sorted(filtered, key=lambda f: f.MarketCap, reverse=True)[:self.fundamental_count] # Calculate NCAV/MV self.long_symbols = [x.Symbol for x in sorted_by_market_cap if ((x.ValuationRatios.WorkingCapitalPerShare * x.EarningReports.BasicAverageShares.TwelveMonths) / x.MarketCap) > self.ncav_threshold] return self.long_symbols def OnData(self, slice: Slice) -> None: if not self.selection_flag: return self.selection_flag = False # Trade Execution portfolio: List[PortfolioTarget] = [PortfolioTarget(symbol, 1 / len(self.long_symbols)) for symbol in self.long_symbols if slice.ContainsKey(symbol) and slice[symbol] is not None] self.SetHoldings(portfolio, True) self.long_symbols.clear() def Selection(self) -> None: if self.Time.month == self.rebalance_month: self.selection_flag = True def OnSecuritiesChanged(self, changes: SecurityChanges) -> None: for security in changes.AddedSecurities: security.SetFeeModel(CustomFeeModel()) # Custom fee model class CustomFeeModel(FeeModel): def GetOrderFee(self, parameters: OrderFeeParameters) -> OrderFee: fee: float = parameters.Security.Price * parameters.Order.AbsoluteQuantity * 0.00005 return OrderFee(CashAmount(fee, "USD"))