Coverage for src/cvxcla/__init__.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-06-27 06:45 +0000

1"""Critical Line Algorithm (CLA) for Portfolio Optimization. 

2 

3This package implements the Critical Line Algorithm introduced by Harry Markowitz 

4for computing the efficient frontier in portfolio optimization problems. 

5The algorithm efficiently computes the turning points of the efficient frontier, 

6which are the points where the set of assets at their bounds changes. 

7 

8The main class to use is CLA, which implements the algorithm and provides 

9methods to compute and analyze the efficient frontier. 

10""" 

11 

12import importlib.metadata 

13 

14from .builder import LassoBuilder, ProblemBuilder 

15from .cla import CLA 

16from .lasso import Lasso 

17from .operators import ( 

18 CovarianceOperator, 

19 DenseCovariance, 

20 FactorCovariance, 

21 GramCovariance, 

22 IncrementalDenseCovariance, 

23 QuadraticForm, 

24) 

25from .pathtracer import ParametricProblem, trace 

26 

27__all__ = [ 

28 "CLA", 

29 "CovarianceOperator", 

30 "DenseCovariance", 

31 "FactorCovariance", 

32 "GramCovariance", 

33 "IncrementalDenseCovariance", 

34 "Lasso", 

35 "LassoBuilder", 

36 "ParametricProblem", 

37 "ProblemBuilder", 

38 "QuadraticForm", 

39 "trace", 

40] 

41 

42try: 

43 __version__ = importlib.metadata.version("cvxcla") 

44except importlib.metadata.PackageNotFoundError: 

45 # Package metadata not available (development/editable install) 

46 __version__ = "0.0.0"