sweissblaug

Sunday, August 18, 2019

Mueller Report Volume 1: Network Analysis


settle down and have another cup of coffee

code

TLDR

There are a lot of Russian’s talking to a lot of Trump campaign members in Mueller report. There are so many it’s tough to get your head around it all. In this post I attempted some network analysis on the relations between campaign officials and Russians. I found that one can ‘compress’ Russian involvement into 9 (mostly) distinct groups. I then summarize these points of contacts.

Introduction to Mueller Report

Volume 1 of Mueller Report starts with Russian interference in 2016 US Presidential Elections. Russia did so in two Ways.

The first was a campaign by the IRA that used social media tools like facebook and twitter with the goal of changing public opinion. While there were some retweets by Trump and his campaign officials from these accounts there wasn’t much direct communication.

The second form was to use Russian intelligence to hack Hillary Clinton's emails. These hacked emails were released with help of wikileaks and guccifer 2.0. Trump’s campaign deliberately tried to find other hacked emails and encourages Russia to do so public. However, the campaign could not find additional information on these emails.

The rest of Volume 1 discusses the numerous relationship between trump campaign officials and Russians. It’s this part that will be the basis for most of the results below.

The data

Volume 1 consists of 199 pages including foot-notes and appendices. I found a machine readable version here. I split the text into sentences and looked at whether a person’s name was included in that sentence. This left me with a sentence by name matrix that is the starting point of my analysis. There are some drawbacks to this in that OCR does not immediately distinguish sentences. In addition it often groups footnotes with last line of sentences in a page. But it seemed like a good starting point so went ahead.

Below are the top 20 most common occurring names. 

Papadopulos, Manafort, Kushner, Cohen, Trump JR, and Flynn are all in the top. Considering they were all, to varying degrees, worked in the Trump campaign this makes sense. We also see some Russian names such as Dmitriev, Kilimnik, and Kislyak. I’ll explain their contacts below.
I then created a person x person matrix that counted the number of times a name co-occurs with another. I’m treating this as a weighted, undirected graph. I transformed this to a laplacian matrix and performed an eigen decomposition. This is known as a spectral analysis of a network. Basically this tries to find locations that minimizes the square error of the relations. Below is the resulting image of 2nd to last and 3rd to last eigenvectors.

WHOA … I’m getting a headache looking at this.

But it definitely looks like there is structure in the graph. There appears to be some clusters forming and these do correspond to particular events described in the report. In the lower left you can see Papadopoulos related characters, in the upper right some cohen acquaintances, and around 0,.1 there’s the trump tower meeting. Not bad but still messy. I’m looking for distinct clusters.

What if we look at only the Russians in the graph?

Ok! Now we’re talking. There are 6 distinct clusters of Russians here. That means there are no relations between these clusters and each correspond to a unique set of relations with trump campaign officials. I played around with this some more but the text data was too messy to have robust analysis. Co-occurring names do not pick up everything and due to sentence parsing errors somethings lead to erroneous relations.

Finally, I gave up on trying to only use text analysis, read volume one, and manually created a network found here. With that I created groupings using the above chart as a starting point. I found 9 fairly distinct clusters of Russians. Below you can see the relationships between those groups and various members of the Trump campaign.


I then further grouped them into 4 broad categories which I’ve named; Trump Business, The Opportunists, The Professionals, and Russian Officials and Lackeys. I also included whether a trump campaign officials interaction was of first degree (they were in meeting or talked explicitly with Russian Group in question) or second degree (they were aware of meeting). Below are my summaries for each.

Trump Business

  • Group 1
    • agalarov, aras, goldstone, samochornov, veselnitskaya, kaveladze, akhmetshin
  • Group 2
    • klokov, erchova
  • Group 3
    • rtskhiladze, rozov
  • Group 5
    • peskov
Aras Agalorov (he has a son Emin. I did not disambiguate the difference between them) is a billionaire Russian Property Developer that worked with trump to create Miss Universe Pageant in 2013. They Discussed creating a Trump tower in moscow in late 2013 and discussed with Donald Trump JR (DTJ) and Ivanka Trump but did not progress.

In Summer of 2015 Group 3 signed a letter of intent to build the trump tower in moscow and met with Ivanka and DTJ.

While this was happening Group 2 contacted cohen to discuss Trump tower in moscow and a meeting with Trump. Cohen thought this person was a pro-wrestler but that did not seem to bother and agreed to talk about business. They wanted to set up a meeting with Trump and Putin but Cohen wanted to keep clear of politics and it went nowhere.

Finally, due to the slowness of progress in Trump Tower Moscow deal from Group 2 cohen reached out to Peskov, Press Secretary for Putin, to try and get in touch with Putin directly and begin building. Cohen worked on moscow deal through summer of 2016 but it went nowhere.
During campaign the Emin Agalorov, at the behest of his father, setup a meeting with DJT to discuss hacked emails. This lead to the infamous Trump Tower meeting that involved DJT, Kushner, and Manafort and other Russians in Group 1. DJT discussed this meeting with others in the campaign as well including Gates. Kushner showed up late to the meeting and texted manafort during that this was a ‘waste of time’ and texted others to call him to get out and he subsequently left early. The meeting did not provide any information to Trump campaign.

The Oppurtunists

  • Group 4
    • mifsud, polonskaya, timofeev, millian
  • Group 5
    • klimentov, poliakova, peskov, dvorkovich
Papadoplous and Page had similar experiences with the Trump campaign and they both seemed to be in it for the opportunity it presented themselves. Both padded his resume to look more important than he was to get the job and both foreign policy advisory roles.

Papadoplous got the job of foreign policy advisor in march 2016. He met Mifsud, a Maltese Professor, in Rome at a meeting for London Centre of International Law Practice shortly after. Upon learning that Papadoplous was employed by campaign Mifsud took interest and spoke of his Russian connections. Papadopolous, thinking that having more russian connections could help his stature in the Trump Campaign, pursued this relationship. They met the following week in London where Mifsud introduced him to Polonskaya. Papadopolous relayed his new contacts with Clovis and received an approving response. This relationship continued and Mifsud said Russia had ‘dirt’ on Clinton during a meeting in late April. Ten days later he told a foreign official about his contacts and knowledge of dirt on Clinton. He then discussed a Trump meeting with Putin to Lewandowski, Miller, and Manafort. Manafort made clear that Trump should not meet with Putin directly.

Page also joined the campaign in march 2016 as a foreign policy advisor. He had previously lived and worked in Russia and had several Russian contacts. He was invited to talk to the New Economic School in Russia in July and asked for permission. Clovis responded that if he went he could not speak for Trump Campaign. His talk was critical of US policy towards Russia and was received welcomingly from Russian Deputy Prime Minister and others. After he met Kislyak in July in Cleveland. These activities drew the attention of the media and was removed from campaign in late september.

After Election Page went to Russia in an unofficial role after the election in late 2016. He again met with Russians in Group 5.

The Professionals

  • Group 6
    • oknyansky, rasin
  • Group 7
    • kilimnik, deripaska, boyarkin, oganov
Paul Manfort and Roger Stone are political consultants and previously worked together. Roger Stone worked alongside the campaign to help but was never officially apart of the campaign. Manafort joined in March 2016 and was the chairman between June and August.

Caputo set up a meeting Stone with Group 6, Oknyansky and Rasin, to get dirt on Clinton in May 2016. Rasin claimed to have information on money laundering activities by Clinton. Stone refused the offer because they asked for too much money.

Also, Stone had some contact with the twitter account Guccifer 2.0 (not shown above). This was the front used by the GRU to release stolen documents. Curiously, his name was redacted on page 45 in the Mueller report because of ‘Harm to ongoing matter’. Seems a little weird to redact something when it’s public information.

From March 2016 until his depart Manafort gave and ordered Gates to give campaign updates to Kilimnik. Kilimnik is thought to be a Russian spy and has connections with Deripaska, a Russian billionaire who Manafort owed money to. Manafort gave polling data on the Trump campaign and met with Kilimnik twice in person; once in May and then again in August. It’s not clear why Manafort gave this data to Kilimnik although Gates thought it was to ingratiate himself to Deripaska. Deripaska and his deputy Boyarkin were subsequently sanctioned by the US Treasury.

Russian Officials and Lackeys

  • Group 8
    • kislyak, gorkov
  • Group 9
    • aven, dmitriev
The final groups deal with Russian Officials and and Putin’s Billionaires.
Sessions and Kushner met with Kislyak, the Russian Ambassador to the US, first in April at a Trump Foreign Policy Conference. These were brief handshake affairs that lasted about a couple of minutes. Sessions does not recall seeing Kislyak.

Sessions, Gordon, and Page met with Kislyak at the Republican National Convention in July. He was one of approximately 80 foreign ambassadors to the US that were invited. Gordon and Sessions met with Kislyak for a few minutes after their speeches. Gordon, Page, and Kislyak later sat at the same table and discussed improving US Russian Relations for a few minutes.
Gordon received an email in August to meet with Kislyak but declined due to ‘constant stream of false media stories’ and offered to rain check the meeting.

In August Russian Embassy set up a meeting with Sessions in Kislyak and the two met in September at Session’s Senate office. Meeting lasted 30 minutes and Kislyak tried to set up another meeting but Session’s didn’t follow up. Sessions got into trouble by not disclosing his meetings with Kislyak and was part of the reason he recused himself from what became known as the Mueller report.

Following the election in November Kislyak reached out to Kushner but Kushner did not think Kislyak had a direct line to Putin and was therefore not important enough to talk to. Nevertheless Kushner met with Kislayk in November at Trump tower and invited Flynn and spoke for about 30 minutes about repairing US Russian Relations. Kislyak suggested using a secure line to talk to Russian generals about Syrian war. Kushner said he had no secure lines to use and asked if they could use russian facilities but Kislyak rejected that idea.

Kislyak tried to get another meeting with Kushner but Kushner sent his assistant instead. Kislyak proposed meeting with Gorkov, the head of a Russian owned bank, instead. Kushner agreed and they met in December. Kushner said that meeting was about restoring US - Russian Relations. Gorkov said it was about Kushner’s personal business. They did not have any follow up meetings.

In december Flynn talked with Kislyak about two separate topics. The first was to convince Russia to Veto anti-Israel resolution on settlements in the UN where it was thought the Obama administration would abstain. Russia did not vote against it. The second was to convince Russia not to retaliate against new sanctions for meddling in US elections. Mcfarland and Bannon were aware of Flynn’s discussions about the sanctions. Russia did not apply retaliatory sanctions.
Finally there were two billionaires men that Putin ‘deputized’ to create contacts with the Trump Campaign after the election; Aven and Dmitriev. Aven said recalled that Putin did not know who to contact to get in touch with President Elect Trump. Aven did not make direct contact to campaign but Dmitriev did through two avenues. One was to try and convince Kushner’s friend to setup a meeting. Kushner circulated this opportunity internally but it went nowhere. The other was meeting with Erick Prince, a supporter of Trump but not officially in campaign, in the Seychelles Islands. Prince discussed his meeting with Bannon but Bannon does not have a recollection of it.

Some notable connections

In general these Russian Groupings were distinct in the people they talked to and had little obvious contact with one another. Some notable exceptions are:
  • Peskov talked to Cohen and Page independently
  • Dmitriev and Peskov might have talked to eachother (p. 149) but there was some ‘investigative technique’ redactions so I’m not sure
  • Kilimnik was aware of Page’s December visit to Russia and discussed with Manafort saying “Carter Page is in Moscow today, sending messages he is authorized to talk to Russia on behalf of DT on a range of issues of mutual interest, including Ukraine” p. 166. Leads me to ask: who would know the whereabouts and discussions of other people? Spies. Thats who.

Conclusions on Volume 1

Overall, I get the impression that the Trump campaign did not have the ‘best people’. Cohen tried to make a deal but couldn’t find the right people to talk to. Papadopolous and DJT tried to get dirt on Clinton but couldn’t find anything. Page seemed to use the campaign as a platform to create more connections with Russians. A few ‘friends’ (Stone and Prince) lent a hand but probably hurt Trump’s credibility by dealing with Russians more than they helped him. Manafort, a seasoned campaigner, wasn’t obviously working for Trump… he worked for free after all. It seemed like a group that were willing to do shady things, for their own personal gain, but without the ability to follow through.
SAD!

All Together Graph

Conclusions on Analysis

Running text analysis before reading report was very helpful to understanding it. There are just so many connections going on it’s hard to keep track. Running some basic clustering techniques as described above helped me zone into what to look for while reading the report.
Posted by sam at 5:46 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: "R", R

Wednesday, September 5, 2018

Who wrote nytimes resistance article?

# nytimes_resistance_letter
Which senior cabinet wrote nytimes 'resistance' article?

Below ranking of each cabinent member. Azar, Acosta, or Haley are most likely to have written article based on data analysis.


['rick perry', 1]
['Kelly_John', 2]
['kirstjen nielsen ', 2]
['mulvaney', 3]
['coats', 3]
['gina haspel', 4]
['mnuchin', 5]
['elaine chao', 5]
['mcmahon', 6]
['mike pomeo', 7]
['sonny perdue', 8]
['mattis', 8]
['zinke', 8]
['ben carson', 8]
['wilbur ross', 8]
['devos', 9]
['Robert Lighthizer', 9]
['sessions', 10]
['Robert L. Wilki', 10]
['haley', 10]
['acosta', 11]
['azar', 16]


I scraped each person's opening testimony as a dataset. I then split each person testimony into sentences. I built a model to predict who wrote a sentence given it's features (bigrams of words and characters).
Applying model to each sentence of resistance article gave a probability that a cabinent member wrote that sentence.
I set a threshold of .1 for each sentence probability; if a person recieved a probability greater than .1 then they were giving a 1 else 0 for that particular sentence. The above ranking is the sum of those scores.


code
Posted by sam at 9:50 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Monday, April 2, 2018

How Much Has Bitcoin Made Society?

Realized Gains Bitcoin

How Much Have People Made on Bitcoin?

Sam Weiss

2018-04-03

Intro:

How much has bitcoin made Society? This post will calculate the realized gains of bitcoin (up to year 2013) as a measure of how much society has made off of bitcoin.

How are realized gains different from market capitalization?

Realized gains measure the amount of money people can claim to have made off of bitcoin. This can be markedly different from the market capitalization.
For instance suppose we have two stocks A and B both with 100 shares and both with a price of $1 at time t_0. Assume the price of both went up to $2 at time t_1. However, suppose all of shares in stock A traded to new people while only one share of stock B traded to new people. The change in realized gains for stock A is $100 while the realized gains in stock B is $1 (assuming everyone for both stocks paid a price of $1 initially).
The example illustrates how market cap and realized gains are different depending on distribution of shares respective previously traded prices.

Does Realized Gains Mean Anything Else?

The above example illustrates why researching realized gains might be interesting in its own right. For instance: it’s much easier to find only one person to believe high prices are valid as opposed to 100 people who do. It may be that increasing prices without corresponding increase in realized gains may lead to evidence of a bubble.

Why Calculate on Bitcoin?

The block chain allows anyone to see the previous time a user purchased a bitcoin and the amount. We can therefore calculate the average price purchased for each user. Since we do not have this information in stocks or currency we cannot calculate it directly for those assets.
There is one heavy assumption on this: that all ID’s (bitcoin address) stay the same. However, it’s common practice that a user his ID when making a trade. This means that the realized gains calculated below are an upper bound since many transactions are self-traded.

Calculations / Results:

I obtained bitcoin transaction data with a package called BlockSci. I calculated the average purchase price of a particular user’s bitcoin holding calculate the realized / unrealized gains accordingly.
Below is a time series chart of market capitalization, realized gains, and unrealized gains up to December 31 2012.
library(ggplot2)
load('/Users/sweiss/Google Drive/blocksci/blog_data.rdata')
gains_plot
It’s interesting to note how realized gains does not increase or decrease significantly during the ‘bubble’ of mid 2012.
By the end of 2012 people have made ~ $79 million dollars of realized gains on bitcoin. This compares with market capitalization of ~ $142 million.
comments

Example Data

Below is an example transaction history for user_id = 1
timeblock_createridheightnum_tradedpricecumulative_sharesavg_purchase_price
2012-12-3101214411-0.000500013.5100-58.001180.8648193
2012-12-19012127480.000000013.5990-58.000680.8647103
2012-11-2801210000-0.250000012.3477-58.000680.8647103
2012-11-0201206133-0.010000010.4688-57.750680.8150009
2012-10-1401203236-0.033123211.7389-57.740680.8133290
2012-10-0301201702-0.000100012.8900-57.707560.8070579
2012-09-1101198260-0.044111211.3308-57.707460.8070370
2012-09-1101198259-0.058211211.3308-57.663340.7989865
2012-09-1101198258-0.011000111.3308-57.605130.7883439
2012-09-0101196682-1.01010109.9654-57.594130.7863304
2012-08-0701192712-0.000500011.1000-56.584030.6224716
2012-08-06011925340.000000010.8552-56.583530.6223790
2012-08-0301192056-0.000399510.9700-56.583530.6223790
2012-07-2801191184-0.00050008.8881-56.583130.6223060
2012-07-2801191157-0.00050008.8881-56.582630.6222329
2012-07-2401190453-0.00265348.6000-56.582130.6221599
2012-07-2001189913-0.10000008.5200-56.579480.6217858
2012-07-1801189695-0.02200009.1098-56.479480.6078015
2012-07-1501189170-0.00100007.6210-56.457480.6044885
2012-07-1501189169-0.06240007.6210-56.456480.6043643
2012-07-0201187212-0.11530006.7600-56.394080.5966004
2012-06-2801186641-0.12345006.6059-56.278780.5839732
2012-06-1201184132-1.23432105.7000-56.155330.5707348
2012-06-1201184127-1.23456005.7000-54.921010.4554573
2012-06-0701183423-0.00100005.5910-53.686450.3348551
2012-06-0101182508-0.00400005.2748-53.685450.3347572
2012-05-2501181523-0.00200005.1455-53.681450.3343891
2012-05-2301181286-0.00100005.1397-53.679450.3342098
2012-05-1801180618-0.00100005.1180-53.678450.3341203
2012-05-1001179528-0.00001004.8500-53.677450.3340312
2012-05-10011795250.00000004.8500-53.677440.3340303
2012-04-2601177317-0.00000195.0976-53.677440.3340303
2012-04-1401175621-0.00100004.9597-53.677440.3340302
2012-04-0301174138-0.00000044.9520-53.676440.3339440
2012-04-0301174128-0.12345684.9520-53.676440.3339439
2012-03-2701173046-0.50000004.8113-53.552980.3232978
2012-03-2301172435-0.04242424.6860-53.052980.2810005
2012-03-2101172202-1.00000674.8149-53.010550.2774752
2012-03-2101172165-0.01000004.8149-52.010550.1902341
2012-03-2101172153-0.02688774.8149-52.000550.1893448
2012-03-07011700600.00400004.9375-51.973660.1869518
2012-03-0701170052-0.00400004.9375-51.977660.1869518
2012-02-11011663650.00000005.6005-51.973660.1865862
2012-02-0301165214-1.00000005.9593-51.973660.1865862
2012-02-03011650840.01000005.9593-50.973660.0733372
2012-01-3001164467-0.01000005.4905-50.983660.0733372
2012-01-1301161943-0.00100006.4100-50.973660.0722745
2011-11-2401154568-0.84265972.4321-50.972660.0721502
2011-10-0201147782-0.00010045.0270-50.130000.0324806
2011-09-26011469640.00000004.8697-50.129900.0324706
2011-08-1101140494-0.00230009.4625-50.129900.0324706
2011-07-0801135235-0.001000014.3140-50.127600.0320379
2011-07-0601134995-0.066600014.7835-50.126600.0317530
2011-06-1701131408-0.010000015.6810-50.060000.0121272
2011-06-0401128554-0.010000018.8900-50.050000.0089966
2011-06-0101127943-0.01000009.5700-50.040000.0052234
2011-06-01011279090.00000009.5700-50.030000.0033116
2011-05-2801127280-0.01000008.3001-50.030000.0033116
2011-05-1301123723-0.01000008.1980-50.020000.0016529
2010-07-290171036-0.01000000.0699-50.010000.0000140
2009-01-03110-50.00000000.0000-50.000000.0000000


Posted by sam at 7:11 PM 2 comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

My Blog List

  • R-bloggers
    More progress with Tabler for R - For R users that are just starting with R or that have been using it for years *Continue reading*: More progress with Tabler for R
    1 day ago

About Me

sam
View my complete profile

Blog Archive

  • ▼  2024 (1)
    • ▼  June (1)
      • pRotectionism: The way to compete in 2024
  • ►  2023 (2)
    • ►  August (1)
    • ►  May (1)
  • ►  2022 (4)
    • ►  August (1)
    • ►  June (2)
    • ►  February (1)
  • ►  2020 (8)
    • ►  December (1)
    • ►  November (1)
    • ►  June (1)
    • ►  May (1)
    • ►  March (2)
    • ►  January (2)
  • ►  2019 (2)
    • ►  October (1)
    • ►  August (1)
  • ►  2018 (2)
    • ►  September (1)
    • ►  April (1)
  • ►  2017 (3)
    • ►  August (1)
    • ►  June (1)
    • ►  January (1)
  • ►  2016 (4)
    • ►  June (1)
    • ►  May (1)
    • ►  January (2)
  • ►  2015 (4)
    • ►  December (1)
    • ►  October (1)
    • ►  April (1)
    • ►  March (1)
  • ►  2014 (11)
    • ►  October (1)
    • ►  August (1)
    • ►  July (1)
    • ►  May (2)
    • ►  April (2)
    • ►  January (4)
  • ►  2013 (20)
    • ►  November (1)
    • ►  October (1)
    • ►  September (3)
    • ►  May (3)
    • ►  April (6)
    • ►  March (1)
    • ►  February (3)
    • ►  January (2)
  • ►  2012 (2)
    • ►  December (2)
Simple theme. Powered by Blogger.