AlgoQuant uses Maven for project management. To download and install the required libraries, you need to do an initialization step.
In NetBeans, open the parent project algoquant and click Build:
NetBeans will download all the required jar files to your local maven repository and run all the tests.
In Eclipse, import the parent project (choose File > Import > Maven > Existing Maven Project, then select the root directory of algoquant). Then, Eclipse may install the required maven plugins and restart.
After Eclipse restarts, you need to run Maven install for the parent project algoquant.
Eclipse will download all the required jar files to your local maven repository.
If there are errors shown in source files in algoquant-core, they may be due to the ignorance of Eclipse about the generated source code. Add the generated source folder:
If you have already installed Maven in your workstation, you can directly use command line interface to do the setup by typing the command:
|> mvn install|
at the outermost project folder. Having done the proper setup, you can now start coding with the AlgoQuant API.
Using AlgoQuant API via Maven dependency
Alternatively, you may use AlgoQuant API in your own project without downloading the whole zipped package. In your project POM, fill in our repository information in the section, then put a dependency in the section. Here is an example:
Numerical Method's Maven Repository
Your own code can now call the API from algoquant-core.
Link to a local AlgoQuant Project
After downloading, unzipping, and installing AlgoQuant, you can create your own Maven project, and link to the local algoquant-core to use the AlgoQuant API. In this case, you can also customize AlgoQuant by changing the code in your local copy.
This is a simple example POM to link your project to your local AlgoQuant:
Note: You have to install (or Clean and Build in NetBeans terminology) your local AlgoQuant again after changing the source code.
The default configuration file is algoquant/core/config/config.default.xml. If you would like to modify the settings (e.g., location of data files), you can edit the file data.properties in the same directory.
Alternatively, you can create your custom-made configuration folder and files as in folder, e.g. haksunli, and define the system property config in your Java environment, e.g., -Dconfig=haksunli/config.haksunli.xml in NetBeans IDE. You can put the configuration files in folder core/src/main/resources/config or any location in the classpath.
If you would like to run unit testing with a different config file, you need to set the property of the test goal (see figure).
All our software requires a license. For NetBeans users, when creating a new file in the project AlgoQuant, you may see this error in the first line of the new file.
|Error reading included file Templates/Classes/../Licenses/license-NumericalMethod.txt|
There are two options. You may choose to ignore them and delete this line each time you open a new file. Alternatively, you can comment out the following line in the project POM file (algoquant/pom.xml):