Commit Graph

6 Commits

Author SHA1 Message Date
Michael Handschuh 0b2344f930 Make alpha models overrideable 2018-05-07 16:13:10 -04:00
AlexCatarino 264da8a596 Calls python destructor to trigger exceptions
The exception in ignored because the generator isn't closed until it is being deleted (automatically in this case, when Python exits); the generator __del__ handler closes the generator, which triggers an exception of there is one.
2018-04-26 18:46:33 +01:00
AlexCatarino 7c6cc4e1dd Refactors AlphaModelPythonWrapper.Name
The cleanest way to get a python type name, when we know it is an instance of a class, is getting the value of the  `__class__.__name__` attribute.

- Changes `CommonAlphaModelTests.ModelNameTest`:
  Since it requires some string manipulation to have the exact model name for C# and Python, we don't define `Name` in the python models and accept the default value from `AlphaModelPythonWrapper.Name`.
2018-04-19 11:28:06 +01:00
Michael Handschuh 90d54da87c Add INamedModel and implement in existing alpha models
Alpha models can choose to implement the Name property, if not, the system
will use the model's type name as the Insight.SourceModel.
Existing tests were updated to also assert expected model names
2018-04-17 16:50:16 -04:00
AlexCatarino b8cfbd7c24 Improves error message in python wrappers 2018-03-14 12:30:50 +00:00
AlexCatarino 35d29060d0 Implements python support for custom models in framework
Adds method overload that accept a `PyObject` to `SetAlpha`, `SetExecution`, `SetPortfolioConstruction`, `SetPortfolioSelection` and `SetRiskManagement`. In these methods, a custom model written in python will be wrapped around the respective `PythonWrapper`.
2018-03-13 11:35:31 +00:00