In this session we will build on the previous systematic strategy session –where we generated and used pre-built technical analysis indicators & features and backtested a simple strategy using various packages in Python. In particular we will focus on the task of Regime Detection to ignore any signals generated that are against the regime we are in and ultimately improve our systematic performance.

An error occured

Support ticket number:

Your support ticket has been created and emailed to you. We will review your message and get back to you shortly via email.

Please try again later

The attached file(s) are not uploaded because of invalid file(s)

OpenSSL, zlib, and cURL are open-source computer software projects to secure communications over computer networks, compress data, and transfer data through various network protocols, respectively. The projects are comprised of command-line tools, header files, and libraries. They are widely used by many systems, applications, and libraries including Refinitiv Real-Time SDK C/C++. Users can utilize OpenSSL, zlib, and cURL libraries available on the system or build the latest versions of those libraries from the source code.

Refinitiv Real-Time SDK C/C++ is a suite of modern and open-source APIs that is designed to simplify development through a strong focus on ease of use and standardized access to a broad set of Refinitiv and proprietary content and services. It uses these libraries to connect to encrypted servers or Refinitiv Real-Time Optimized on the cloud.

This article demonstrates step by step to build OpenSSL, zlib, and cURL libraries from the source code on a Linux machine (Centos 7). Then, it shows how to use these libraries in Refinitiv Real-Time SDK C/C++. The topics include:

  • Build OpenSSL Libraries
  • Build zlib libraries
  • Build cURL Libraries
  • Use the Libraries with Refinitiv Real-Time SDK C/C++
  • Prerequisites

    To follow the steps in this article, you need to have a Linux machine, such as Centos 7 with the following packages installed.

  • wget: A utility for retrieving files using the HTTP or FTP protocols
  • perl-core : Base perl meta-package (Required to build OpenSSL)
  • make : A GNU tool that simplifies the build process for users
  • gcc: GNU Compiler Collection
  • You can use the following command to install these packages. The Internet connection is required to install these packages.

    Build OpenSSL libraries

    OpenSSL is a software library implementing the SSL and TLS protocols for applications that secure communications over computer networks. It is widely used by Internet servers, including the majority of HTTPS websites. It contains two libraries which are libssl and libcrypto. The libcrypto library provides the fundamental cryptographic routines used by libssl.

    The following steps show how to build the OpenSSL libraries and a binary file from the OpenSSL source package on a Linux machine (Centos 7).

    1.      Download the OpenSSL source code

    The OpenSSL is open source and the source code is available on the OpenSSL official website ( https://www.openssl.org ). The wget command can be used to download the OpenSSL source code package. At the time of this writing, the current versions of the OpenSSL packages are openssl-1.1.1n and openssl-3.0.2 .

    I will download the openssl-1.1.1n package but the steps mentioned in this article can also be used with the openssl-3.0.2 package.

    First, change the directory to /usr/local/src . The source code of the OpenSSL package will be extracted in this directory.

    2.      Decompress the OpenSSL package

    The OpenSSL source package file is compressed so the tar command can be used to decompress the package.

    Run the following tar command to decompress the OpenSSL source package.

    Description --prefix=/opt/openssl The top of the installation directory tree. The OpenSSL libraries will be created in this directory (/opt/openssl) --openssldir=/usr/local/ssl Directory for OpenSSL configuration files, and also the default certificate and key store

    The command will install all the OpenSSL components in the directory specified in the --prefix option ( /opt/openssl ) and --openssldir option ( /usr/local/ssl ).

    The libraries are in the /opt/openssl/lib directory and the OpenSSL binary file is in the /opt/openssl/bin directory.

    Build zlib Libraries

    Zlib is a free and general-purpose lossless data-compression software library for use on any computer hardware and software platform, including Linux, macOS, and iOS. The zlib data format is itself portable across platforms. The following steps demonstrate how to build zlib libraries from the zlib source package on a Linux machine (Centos 7).

    1.      Download the zlib source code

    Zlib is open source and the source code is available on the zlib official website ( https://zlib.net/ ). The wget command can be used to download the zlib source code package. At the time of this writing, the current version of the zlib package is zlib-1.2.12.

    First, change the directory to /usr/local/src. The source code of the zlib library will be extracted in this directory.

    2.      Decompress the zlib source package

    The zlib source package file is compressed so the tar command can be used to decompress the package.

    Run the following tar command to decompress the zlib source package.

    Build cURL Library

    cURL is a computer software project providing a library (libcurl) and a command-line tool (curl) for transferring data using various network protocols. It builds and works identically on many platforms. cURL supports HTTPS and performs SSL certificate verification by default when a secure protocol is specified such as HTTPS. It relies on the OpenSSL libraries to perform SSL certificate verification.

    The following steps show how to build a cURL library and cURL binary file from the cURL source package on a Linux machine (Centos 7). Moreover, the cURL library and cURL binary file will use the OpenSSSL and zlib libraries created in the previous sections.

    1.      Download the cURL source code

    The cURL is open source and the source code is available on the cURL official website ( https://curl.se/download.html ). The wget command can be used to download the cURL source code package. At the time of this writing, the current version of the cURL package is curl-7.83.0.

    First, change the directory to /usr/local/src . The source code of the cURL library will be extracted in this directory.

    2.      Decompress the cURL package

    The cURL source package file is compressed so the tar command can be used to decompress the package.

    Run the following tar command to decompress the cURL source package.

    Description --prefix=/opt/curl The top of the installation directory tree. The cURL files will be created in this directory (/opt/curl) --with-openssl=/opt/openssl Where to look for OpenSSL. PATH points to the SSL installation (/opt/openssl) --with-zlib=/opt/zlib Where to look for zlib. PATH points to the zlib installation (/opt/zlib)

    At this point, the cURL binary and library files are built properly.

    Use the Libraries with Refinitiv Real-Time SDK C/C++

    The zlib, OpenSSL, and cURL can be used with the Refinitiv Real-Time SDK C/C++ applications to connect to encrypted servers or Refinitiv Real-Time Optimized on the cloud.

    1.      Copy the following files to the current directory of the Refinitiv Real-Time SDK C/C++ application.

  • /opt/zlib/lib/libz.so.1.2.12
  • /opt/openssl/lib/libssl.so.1.1
  • /opt/openssl/lib/libcrypto.so.1.1
  • /opt/curl/lib/libcurl.so.4.8.0
  • export LD_LIBRARY_PATH=/opt/refinitiv/Real-Time-SDK/Cpp-C/Ema/Executables/OL7_64_GCC485/Optimized

    Summary

    OpenSSL, zlib, and cURL are open-source and popular software projects used to secure communications over computer networks, compress data, and transfer data through various network protocols. Users can easily install these packages by using the package management tool. However, the installed packages may be outdated.

    Another option is building the binary packages from the project’s source code. With this method, users can get the latest version of the packages. This article demonstrates step by step to build OpenSSL, zlib, and curl libraries from the source code on a Linux machine (Centos 7). There are four steps to building the package. The first step is downloading the source code package from the official project website. The second step is decompressing the package. The third step is configuring the package and the final step is building the package. The outcome contains executable files, development libraries, header files, and man pages.

    References

  • cURL. n.d. cURL . [online] Available at: < https://curl.se/ > [Accessed 3 May 2022].
  • En.wikipedia.org. n.d. cURL - Wikipedia . [online] Available at: < https://en.wikipedia.org/wiki/CURL > [Accessed 3 May 2022].
  • OpenSSL. n.d. OpenSSL . [online] Available at: < https://www.openssl.org/ > [Accessed 3 May 2022].
  • En.wikipedia.org. n.d. OpenSSL - Wikipedia . [online] Available at: < https://en.wikipedia.org/wiki/OpenSSL > [Accessed 3 May 2022].
  • Developers.refinitiv.com. n.d. Refinitiv Real-Time C++ SDK | Refinitiv Developers . [online] Available at: < https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-cc > [Accessed 3 May 2022].
  • En.wikipedia.org. n.d. zlib - Wikipedia. [online] Available at: <https://en.wikipedia.org/wiki/Zlib> [Accessed 11 May 2022].
  • Zlib.net. n.d. zlib Home Site. [online] Available at: <https://zlib.net/> [Accessed 11 May 2022].
  •