Bleeding Mac OS

One question that I am asked frequently is which operating system to use for quantitative trading research and implementation.

Deepin, elementary OS, and Pear OS are probably your best bets out of the 10 options considered. 'Easy to use' is the primary reason people pick Deepin over the competition. This page is powered by a knowledgeable community that helps you make an informed decision. Like DirectX, Metal is intended to provide games and applications, direct access to your Mac’s GPU, allowing improved rendering, frame rates, and other benefits. Metal was actually introduced in iOS 8, but with the recent announcement that it will be rolled into OS X, 10.11, El Capitan, graphic performance on Macs, particularly with regard to. Get more done with the new Google Chrome. A more simple, secure, and faster web browser than ever, with Google’s smarts built-in.

The short answer, as of the writing date of this article, is if you want to carry out any serious/mathematical quant trading research (machine learning/deep learning) you should make use of Ubuntu 16.04 LTS Linux, with a desktop version on a local research machine and the server version on a live trading VPS or equivalent. It is the most straightforward way to avoid problems with the bleeding-edge libraries that are required to carry out this form of research.

However, Ubuntu/Linux is likely to be unfamiliar to many of you since Windows is still the de facto choice of operating system both at home and in the modern office environment.

Given that your likely goal is to spend as much time as possible researching and developing quantitative trading strategies, rather than reading through stacks of programming books, is it worth your while to learn a brand new operating system and associated command line interface (CLI)?

Clearly this will depend upon your circumstances, preferred method of trading research, coding language of choice and complexity of your models. I would like to argue that for the majority of more complex Python-oriented scientific/quantitative research that learning Ubuntu/Linux and the CLI will pay immense dividends over your quant career.

Let's now take a look at the three major operating systems that are likely to be used within quant trading research.

Microsoft Windows

I am going to assume for the purposes of this article that nearly all, if not all, readers are completely familiar with Windows so I don't feel I need to explain what it is here, unlike the other two operating systems considered below!

Why Is It Advantageous For Quant Trading?

Windows is generally easily available (most new computers come with it as the default operating system) and much of the retail quant trading GUI-based software has been written solely for Windows. This alone makes it an extremely strong contender for much of quant trading.

While in the past Windows had a reputation for crashing intermittently (e.g. the famous Blue Screen Of Death) these days, with newer versions of Windows having been built on the old Windows NT kernel, it is often extremely reliable.

Further it is straightforward to transfer a GUI-based quant trading system from Windows Desktop to Windows Server, through a cloud-based service such as Microsoft Azure or Amazon Web Services.

All of the major relational databases are supported on Windows, including MySQL, PostgreSQL as well as Microsoft's own strong database contender, SQL Server. There are intuitive GUI interfaces to these databases provided by all of the vendors.

What Are Its Pitfalls?

Windows' main disadvantage, at least for 'power' use lies in the fact that it relies almost exclusively on the GUI. This is an ideal situation for nearly all desktop usage but for quant trading at the advanced level it can be a distinct disadvantage. Higher-frequency quant models rely quite heavily on automation and task scheduling, where the CLI and tools like Unix cron are extremely effective. This makes Windows significantly less attractive as the frequency and level of desired automation of a strategy increases.

It also still has some difficulty in 'playing nicely' with Python. While the Anaconda distribution largely solves this problem, there are still libraries where it is necessary to compile C/C++ code from scratch that often assumes the presence of a C++ compiler, such as GCC. This usually means installing a tool like Cygwin. However, once you get to this stage I feel it is worth just 'starting over' and installing Ubuntu, rather than trying to replicate Linux within Windows.

A minor point these days is that Windows is also rather resource-hungry and so if absolute execution speed is required, Windows can be a little slower than an equivalent Linux system (particularly when it comes to server editions).

Apple Mac OS X

Mac OS X is the operating system found on Apple's line-up of Macs. It is actually a heavily modified version of a Unix distribution known as BSD. This means that it actually has a 'best of both worlds' approach to both a GUI and CLI.

It provides an extremely intuitive gesture-based GUI but is also extremely popular with software developers as it has Linux-like capabilities built in.

I have personally used a MacBook Air for a number of years for Python development although I have since gravitated more towards Ubuntu Desktop for the majority of my Python 3 quant trading development.

Why Is It Advantageous For Quant Trading?

Its advantage lies primarily in the fact that it has both a comfortable GUI and powerful CLI, similar to Ubuntu. Hence it is easy to setup a Python quant research environment, using either a direct virtual environment approach or with a precompiled toolkit such as Anaconda.

Mac

The CLI brings in all the power of scripting and automation that is present in Linux systems, but the operating system allows easy compatibility with known ecosystems such as Microsoft Office. For certain users this can be a 'dealbreaker' requirement.

Mac systems also have a reputation for being extremely reliable and stable. To provide a personal anecdote, I once went 251 days without a proper reboot of my MacBook Air. It is currently sitting at 91 days of uptime as I write this article!

What Are Its Pitfalls?

Perhaps the major disadvantage of Mac OS X is that due to Apple's consumer-facing business model there is no equivalent server environment that a quant trading model can be easily deployed to. Instead a model will need to be ported to a Linux server distribution (such as Ubuntu Server).

This is a non-trivial problem as differences in packages and deployment approaches can lead to catastrophic production errors that can take a strategy/portfolio offline. I have personally seen this happen in a rapidly-moving production environment.

Hence the common workaround is to utilise virtual machines (or a tool such as Docker) to develop on a nearly identical setup, locally. However this then motivates the question as to why a Mac is being used in the first place, rather than a local machine that uses Linux!

Indeed, for a particular absolute dollar amount a Mac laptop/desktop is usually less powerful than an equivalent machine by another manufacturer, e.g. Lenovo. Hence you are paying more for the Apple 'brand' than raw computational power.

It is also likely that for the specific use case of DL-based work on GPUs, a Mac can be troublesome to try and configure. It is often much simpler to build a desktop machine from scratch and put Ubuntu on it for this purpose.

Ubuntu/Linux

Microsoft Windows has a philosophy of vertical integration of all components, rapid ease-of-use, graphical interface and abstracting away complexity for the user. For nearly all day-to-day use cases this is the perfect approach and is largely why Windows, and Microsoft, has seen so much historical success.

The Linux ecosystem is structured rather differently. Its philosophy is based around a hierarchical interaction of many different components, open and freely available code, a mixture of graphical and command line interfaces, as well as the ability to allow the user to perform powerful, complex operations with scripts.

In addition there are multiple distributions of Linux that all mix and match components differently. This can be extremely confusing for newcomers who are largely used to a 'one size fits all' approach either with Windows or Mac OS X.

Thankfully, the 'market' has consolidated somewhat around a popular distribution known as Ubuntu. Ubuntu was originally built on top of another powerful Linux distribution known as Debian, but has since taken a different direction.

In addition to this, over a number of years, Ubuntu has become easier to install and try out. It has evolved to provide an almost 'out of the box' solution for basic word processing, spreadsheet and general 'office' tasks. This makes it easier to transition from Windows or Mac for normal desktop use.

Why Is It Advantageous For Quant Trading?

The primary advantage of Ubuntu/Linux lies in its CLI capability. Having an extremely powerful CLI and scripting engine allows sophisticated automation of processes including data management, backtest engine development, broker interactivity and general research ability.

It is also the 'only game in town' if you wish to operate at the bleeding edge of quantitative finance modelling with advanced ML/DL libraries. For DL in particular, nearly the entire research ecosystem is carried out in Python using TensorFlow and PyTorch, both of which have non-trivial installation requirements. In fact, anecdotally, these libraries are very difficult to get working with GPUs on Windows and so Ubuntu is the only realistic choice.

Using Linux makes it extremely straightforward to provide a sophisticated software development overlay to a quant trading model deployment process. All the power of version control and continuous integration is easily available within a Linux/CLI environment.

It's no accident that the majority of the top quant hedge funds almost exclusively use Linux and custom-developed environments for both research and development.

For those who wish to get into heavily quantitative or ML/DL based trading research I would highly recommend usage of Ubuntu Linux as your operating system.

What Are The Pitfalls?

The biggest problem in using Ubuntu/Linux is that most of the power comes through extensive use of both the command line interface and scripting. These are skills that can be learnt relatively quickly, but true mastery can take years. Linux very much has a 'tinker under the hood' philosophy and this can be highly interesting, or extremely tiresome, depending upon your goals.

In addition to this Linux is not very forgiving when it comes to errors. The nature of ML/DL quant trading research relies on some bleeding edge libraries, such as TensorFlow/PyTorch that interact with GPUs. Hence installation of drivers, libraries and other tools can lead to problems.

Bleeding Mac Os Update

Such problems are tricky to diagnose for a newcomer as the error messages can be relatively undecipherable. This can be extremely frustrating for those who are used to Windows and Mac 'just working'.

Linux has a much more explicit approach to user/admin permissions and this often stumps newcomers used to administrative privileges being largely abstracted away on Windows/Mac OS X. Another source of confusion lies in dependency management where certain packages (particularly Python libraries) can rely on necessary system packages being installed and correctly configured. Obscure error messages can arise that require a degree of experience to diagnose.

However, this could also be seen as the 'price' for operating at the bleeding edge in order to make sophisticated models. Despite these issues there is an extremely welcoming community ready to help out new users and most errors have been seen (and diagnosed) before.

In Summary

Windows and Mac OS X are great for most 'vanilla' GUI-based quant trading research. However, they are largely inappropriate for DL/ML research at the bleeding edge.

Ubuntu/Linux is the only realistic approach for the heavy quantitative DL/ML work, and is extremely powerful once expertise of the CLI has been obtained. However, it is not forgiving with regards errors due to permissions or dependency problems. In addition, the mixed-component philosophy can seem confusing to those used to one-size-fits-all operating systems.

WHAT IS MAC (MYCOBACTERIUM AVIUM COMPLEX) AND HOW IS IT DIAGNOSED AND TREATED?

  • Formerly known as “atypical mycobacteria”, “atypical TB”, or “atypical AFB” and currently as “nontuberculous mycobacteria” or “NTM”. NTM includes all types or species of mycobacteria (including MAC) other than the germ of tuberculosis (TB).
  • Related to Mycobacterium tuberculosis (Mtb) but it is not TB (tuberculosis).
  • NTM includes a number of different species, but the most common one causing chronic lung disease is MAC.
  • MAC is not spread person to person like Mtb. MAC is not contagious.
  • MAC lung disease seen in HIV negative (non-AIDS) patients is a chronic lung infection and early-on is often misdiagnosed as chronic bronchitis or recurrent pneumonia.
  • MAC Lung Disease is acquired from the environment (soil, air, natural waters, tap water, etc.)
  • Scientists and physicians who have studied MAC believe people who develop MAC lung disease become infected because of a defect in the structure or function of their lungs (especially a disease called bronchiectasis) or in their immune systems.
  • Damaged lung tissue can result from previous TB, heavy smoking, and a breathing tube disease called bronchiectasis.
  • Bronchiectasis is a breathing tube (bronchial) disorder characterized by excessive mucus production, cough, and susceptibility to certain infections such as MAC or infection caused by bacteria such as Pseudomonas aeruginosa.
  • Disease in men commonly relates to smoking while disease in women (non-smoking) usually relates to bronchiectasis.
  • The average age of patients with MAC lung disease in men is 55 years and 67 years in women.
  • Men are more likely to have cavitary MAC (holes in their lungs). Women are more likely to have non-cavitary, nodular MAC.
  • Diagnosis of MAC lung disease usually requires:
  • Medical history with records of symptoms:
  • Cough, sputum production, shortness of breath
  • Loss of appetite (anorexia is the medical term) weight loss
  • Severe fatigue or tiredness with inability to perform daily tasks
  • Rarely coughing up blood (hemoptysis is the medical term)
  • Fever, night sweats
  • Chest x-ray (a picture of your lungs internally)
  • High resolution CT scan (HRCT) (similar to an x-ray but a more detailed picture)
  • Sputum culture – several sputum cultures are usually performed. Your specimen coughed from your lungs is examined under a microscope (AFB smear) and also placed on special media to grow mycobacteria (AFB culture).
  • Bronchoscopy – may be necessary in some cases (especially if you can not cough up sputum) but not all, and involves putting a tube down into your lungs to obtain specimens for culture.

TREATMENT OF MAC LUNG DISEASE REQUIRES A MULTI-DRUG REGIMEN (MORE THAN ONE DRUG).

  • MAC is resistant to ordinary antibiotics.
  • Combination of 3 drugs (all FDA approved)/dosages are based upon your clinical history, age, weight, and symptoms.
  • Clarithromycin (Biaxin) or Azithromycin (Zithromax)
  • Rifampin (Rifadin) or Rifabutin (Mycobutin)
  • Ethambutol (Myambutol)
  • The combination of medicines is given until no more MAC germs can be grown by culture of your sputum for 1 year. Average treatment period is about 15-18 months.
  • Monthly sputum cultures are performed while you are on therapy and periodically when you finish your therapy to be sure your MAC is gone.
  • The 3-drug treatment may be given 3 times weekly (preferably Monday-Wednesday-Friday) or daily.
  • Data from previous treatment trials tells us that most patients (approximately two-thirds) who have no previous treatment of their MAC and who can tolerate the appropriate medicines will get better and be “cured” of their MAC lung disease.
  • Patients who have failed a prior drug regimen of > 6 months for their MAC are more likely to fail the standard drug regimen (almost 50%).
  • Patients who take the 3-drug regimen for less than 1 year with negative cultures are more likely to relapse with disease with their same MAC strain.
  • Patients who fail therapy after taking the 3 medicines are usually required to take additional medicines. Injectables which may be useful include:
  • Streptomycin or Amikacin
  • Amikacin can also be given by inhalation (aerosolized) and is less toxic when given in this manner.
  • Monthly laboratory blood tests that include a complete blood count and comprehensive metabolic panel (CBC and CMP) to check for possible damage to blood cells, kidneys, and liver.
  • Most common potential side effects/complications of medicines:
  • Clarithromycin : Loss of appetite, diarrhea, nausea, abdominal pain, abnormal liver function tests (blood tests), bitter taste, mild allergic rash.
  • Azithromycin : Diarrhea, nausea, abdominal pain, abnormal liver function tests (blood tests), decreased hearing, tinnitus (sounds in ears).
  • Rifampin : Nausea, vomiting, liver damage, decreased platelets (cells which clot blood), body secretions (urine primarily) are orange/red.
  • Rifabutin : Nausea, vomiting, decreased platelets, decreased white blood cells (cells that fight infection), eye pain (uveitis), diffuse muscle and joint aches, skin pigmentation (yellow).
  • Ethambutol : Decrease in vision (especially color vision), blurriness.
  • Streptomycin : Kidney damage, sounds in ears (tinnitus), hearing loss, poor balance, numbness, tingling, muscle damage, fever, headache.
  • Amikacin : Kidney damage, tinnitus, hearing loss, poor balance.
    If you experience these or other additional problems, you should discuss them with your physician.
  • Amikacin by inhalation (aerosolization) decreases toxicity to above adverse events.

Provide a list of your current medicines to your physician so he can determine any possible contra-indications.

PULMONARY FUNCTION TESTING

What is a pulmonary function test?

Pulmonary function testing is a way to measure your breathing capacity and, therefore is an objective measure of how well you are breathing. There are several types of breathing tests that can be done during pulmonary function testing including spirometry, lung volumes and diffusing capacity. A technician will explain what you need to do during each test and will coach you during the tests to help you give a good effort. All breathing tests require more than one measurement so that you will be asked to make more than one effort for each test. Spirometry is the most commonly performed breathing test. It requires you to take in as deep a breath as possible and then blow out the air in your lungs as forcefully and fully as possible. Spirometry, therefore, measures how much air you breathe in and out and how fast you breathe air in and out. Spirometry is frequently performed at baseline and then after you have inhaled a bronchial dilating drug (breathing medicine) to evaluate the effect of medication on your breathing function. As with all pulmonary function tests, it is very important that you make a maximal effort to insure accurate assessment of your breathing function. Lung volumes are performed while you are sitting in a small chamber called a plethysmograph (or body box) and provide further information about how much air you breathe in and out. You will be asked to perform different breathing techniques such as blowing into a tube while in the chamber. Lung volumes are usually not performed unless there are abnormalities found on spirometry. The diffusing capacity is one measure of how well your lungs move oxygen from the lungs into the blood. The results of pulmonary function testing can tell you and your doctor how much your lungs have been affected by a disease process and help determine if specific therapy can be of benefit to you. They can also be useful for evaluating the effects of a disease or treatment over time. You will be given specific instructions about what to do with your own breathing medications when the breathing tests are scheduled. Pulmonary function testing usually takes between ½ to 1 ½ hour to complete, depending on how many of the pulmonary function tests you are asked to complete.

Bleeding Mosquito Bites

Also see the http://www.uthct.edu website for further information including on how to arrange a clinic visit for expert consultation on MAC. Other centers that can also provide such consultation are found under the List of Treating Institutions.