Tuesday, August 15, 2017

random quote of the day

A short quote on the acceleration of technological breakthroughs at breakneck speed:
The information society has been brought about by the fastest growing technology in history. No previous generation has ever been exposed to such an extraordinary acceleration of technological power over reality, with the corresponding social changes and ethical responsibilities. Total pervasiveness, flexibility, and high power have raised ICT to the status of the characteristic technology of our time, factually, rhetorically, and even iconographically.

The computer presents itself as a culturally defining technology and has become a symbol of the new millennium, playing a cultural role far more influential than that of mills in the Middle Ages, mechanical clocks in the seventeenth century, and the loom or the steam engine in the age of the Industrial Revolution.

Taken from The Philosophy of Information, Luciano Floridi, 2011, pages 4 and 5.


Tuesday, August 1, 2017

How To ICO

token fun A little tutorial showing you how to create your own ERC20 tokens using Solidity on the Ethereum testnet Rinkeby.

Preface

To get started, you need Ubuntu Linux running. An easy way is to

Then you need to install
  • Solidity  (object-oriented programming language for writing smart contracts);
  • Geth (command line interface for running a full ethereum node implemented in Go).
To do this, execute the following:
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ethereum/ethereum
$ sudo apt-get update
$ sudo apt-get install geth solc

Check your installation:
$ solc --version
$ geth version
See more details here.


Solidity Deployment

Synchronize blockchai:
$ geth --rinkeby --fast
This will take a couple of minutes. Once you see something like this in the terminal, you are up to date (note that an average block time is 15s):
    INFO [08-01|14:53:24] Imported new chain segment blocks=1 txs=1
    mgas=0.021  elapsed=1.998ms   mgasps=10.505  number=638703
    hash=273388…bd5211
Then you can CTR-C.

To launch the CLI:
$ geth attach $HOME/.ethereum/rinkeby/geth.ipc
Create  an address (account) on the Rinkeby testnet:
$ geth --rinkeby account new
Enter password and save address.

Start Geth:
$ geth --rinkeby --rpc --rpccorsdomain '*' --rpcapi 
"eth,net,web3,personal" --unlock 0 --password <(echo XXX)

Go to:
Get ETH:
  • Go to https://www.rinkeby.io/ and click "Crypto Faucet".
  • You need a GitHub account.
  • Login to create a Gist: description and filename can be anything, however, the first line (starting with "1") needs to contain the address you generated above, preceded by "0x" (see example).
  • Refresh the GUI at http://ethereum.github.io/browser-solidity/ (and choose "Web3 Provider" again)
Now you should have an account balance showing a few ether.


Deploy Test Contract

Set up:
  • In  http://ethereum.github.io/browser-solidity/ add a new contract (plus sign top left). 
  • Fill in example code from here.
  • Click "Create" (orange/pink button right-hand side).
  • Wait for transaction to be mined.
  • Check terminal synchronizing blocks: you should see the address of the new contact "contract=0x0498b6289f48e28124ec23c30993fcf59af22092".
  • You should have less ether (top right).
  • Check contract address in https://rinkeby.etherscan.io/.
Play:
  • You should have buttons in the browser on the right-hand side (http://ethereum.github.io/browser-solidity/) corresponding to the getter and setter functions.
  • Enter in "set": 2,"MyAddr",42
  • Entering 2 in "getAmount" or "getAddr" should return "42" and "MyAddr", respectively.


Create ERC20 Token

  • Copy code from here into http://ethereum.github.io/browser-solidity/.
  • Deploy contract with "Create" button ("browser/myToken.sol/MyToken").
  • Check "totalSupply" button.
  • Check your balance by putting your account address you generated with Geth above into the "balanceOf" field (right-hand side). NB: address is in quotes and add "0x" if missing in the beginning of the string.
  • Check contract address (from synchronization terminal or "Copy address" button in browser) in 
With the parity wallet (stop synchronizing terminal and go to http://127.0.0.1:8180/ ) ERC20 tokens can be stored. Create a new wallet address. Stop parity and restart Geth. Click " transfer" button with your parity address in quotes and some amount.

Voila, you just did an ICO and transferred some tokens.

See my example token (original address and my parity wallet).

Thursday, May 11, 2017

the relativity of the subjective perception of reality

fun with memes
The label post-truth is quintessential to our world today. We have transitioned from:
  • pstmodernism
to
  • constructivism
on to
  • relativism
Basically, today you can believe whatever you like and there will always be an on-line subculture defending those views with "facts". Ironic in times when neuroscience is able to explain why our brains cling to the belief systems it has formed, especially when presented with evince negating the beliefs.

The relativism of defining one's own subjective experience of the external world is perhaps most obvious when it come to conspiracy theories. Below a meme ranking conspiracy theories by how much you need to warp your perception of reality in order to convince your brain it's true.

By the way, I believe in the last four;) See here and here for details on why. This was my motivation for making the meme: If people are willing to believe bat shit crazy stuff, why not go all the way? While traditional conspiracy theories rely on everyone lying to you and constantly deceiving you, "my" conspiracy theories place you in the center of creation.


Monday, April 24, 2017

some output...

more work

The Alpha Engine: Designing an Automated Trading Algorithm

We introduce a new approach to algorithmic investment management that yields profitable automated trading strategies.

This trading model design is the result of a path of investigation that was chosen nearly three decades ago. Back then, a paradigm change was proposed for the way time is defined in financial markets, based on intrinsic events. This definition lead to the uncovering of a large set of scaling laws. An additional guiding principle was found by embedding the trading model construction in an agent-base framework, inspired by the study of complex systems.

This new approach to designing automated trading algorithms is a parsimonious method for building a new type of investment strategy that not only generates profits, but also provides liquidity and stability to financial markets and does not have a priori restrictions on the amount of assets that are managed.


Trading model simulations.

History

The trading model algorithm outlined here is the result of a long journey that began in the early 1980s. Starting with a new conceptual framework of time, this voyage set out to chart new terrain. The whole history of this endeavor is described in the appendix. The key ingredients of this new paradigm are:
  • Intrinsic Time
  • The Emergence of Scaling Laws (*)
  • Trading Models and Complexity (*)
  • Coastline Trading (*)
  • Novel Insights from Information Theory
  • The Final Pieces of the Puzzle: Asymmetric Thresholds
(* I was lucky to have been part of this 12-year leg of the journey)

The trading model algorithm described here is the result of a meandering journey that lasted for decades. Guided by an overarching event-based framework, recasting time as discrete and driven by activity, elements from complexity theory and  information theory were added. In a nutshell, the proposed trading model is defined by a set of simple rules executed at specific events in the market. This approach to designing automated trading models yields an algorithm that fulfills many desired
features. Its parsimonious, modular, and self-similar design results in behaviour that is profitable, robust, and adaptive.


⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼

⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼

Context

A crucial feature of the trading model is that it is designed to be counter trend. The coastline trading ensures that positions, which are going against a trend, are maintained or increased. In this sense, the models provide liquidity to the market. When market participants want to sell, the investment strategy will buy and vice versa. This market-stabilizing feature of the model is beneficial to the markets as a whole. The more such strategies are implemented, the less we expect to see runaway markets but healthier market conditions overall. By construction, the trading model only ceases to perform in low-volatility markets.

If investment strategies contribute to market liquidity, they can help stabilize prices and reduce the uncertainty in financial markets and the economy at large. For such strategies the investment returns can be viewed as a payoff for the value-added provided to the economy.


Your Help is Needed

In essence, what we present here is a proof of concept. We refrained from tweaking the model to yield better performance, in order to clearly establish and outline the model's building blocks and fundamental behavior. We strongly believe there is great potential for obvious and straightforward improvements,  which would give rise to far better models. Nevertheless, the bare-bones model we present here already has the capability of being implemented as a robust and profitable trading model that can be run in real-time. 

Nevertheless, with all the merits of the trading algorithm presented here, we are only at the beginning. The Alpha Engine should be understood as a prototype. The model can easily be improved by calibrating the various exchange rates by volatility, or by excluding illiquid ones. Furthermore, the model treats all the currency pairs in isolation. There should be a large window of opportunity for increasing the performance of the trading model by introducing correlation across currency pairs. This is a unique and invaluable source of information not yet exploited. Finally, a whole layer of risk management can be implemented on top of the models.

We hope to have presented a convincing set of tools motivated by a consistent philosophy. If so, we invite the reader to take what is outlined here and improve upon it...


--

This paper will appear as a chapter in the book High Performance Computing in Finance: Problems,  Methods, and Solutions, Chapman & Hall/CRC Series in Mathematical Finance, 2017


Thursday, March 23, 2017

More Networks

at work

This is a network of power. This time not economic power, but megawatts of capacity.

The pink nodes are power plants producing energy. They are the sources in this flow network. The green nodes are sinks. They are the utilities in the All Country World Index (MSCI ACWI) and are scaled by the MW of power reaching them directly or via the network of subsidiaries (blue nodes).

The right hand side of the figure reveals the piping in the network, where the nodes are removed and only the weighted and directed ownership links are shown.

This is an example of climate finance, a topic slowly appearing on the radars of institutions. See, for instance, Mark Carney's speech, as Governor of the Bank of England.

Data sources: GlobalData and Orbis. The work is done for the SEI Metrics Project.