Validation
Local validation before submission (Optional)
Why Validate?
Before submitting your alpha model, it's highly recommended to use the validation feature. This step ensures that there are no issues with your model algorithm, as the submission process includes several validation checks.
Catch Errors Early: It allows you to identify and fix any issues with your algorithm beforehand, reducing the chances of submission rejection.
Understand the Process: By validating, you become more familiar with the submission checks. This knowledge helps you prepare your model better for the production environment.
Minimize Submission Errors: Validation helps reduce the likelihood of encountering errors due to discrepancies between your local development data and the production data.
Note
The validation feature only simulates a part of the actual submission process and may not catch all errors that could occur in a live production environment.
Validate with FINTER
FINTER provides a ValidationHelper
class that allows you to perform this validation locally. Below, we will go through the process of setting up the environment and executing the validation steps.
Setting Up the Environment
First, we need to set up our environment by providing the FINTER API key. This key is essential for authenticating and accessing the FINTER services.
Importing ValidationHelper
Next, we import the ValidationHelper
class from the finter.framework_model
module. This class will be used to perform the validation of our portfolio model.
Defining Model Information
We define the model information, which includes details about the exchange, universe, instrument type, frequency, position type, and model type. This information is required for the validation process.
Understanding ValidationHelper
Before we proceed with the validation, let's understand what ValidationHelper
does by printing its documentation.
Performing Validation
Now, we will create an instance of ValidationHelper
with our portfolio model name (e.g., "sample") and the model information. We will then call the validate
method to perform the validation.
Checking End Dependency
We can also check for end dependency in our portfolio model using the validate_end_dependency
method.
Checking Start Dependency
Similarly, we can check for start dependency using the validate_start_dependency
method.
By executing these steps, you can validate your portfolio model locally and ensure that it is ready for deployment in a live trading environment. Remember to replace SAMPLE_DIRECTORY with your actual portfolio model name and YOUR_FINTER_API_KEY with your actual FINTER API key.
Last updated