tag:blogger.com,1999:blog-5440415324855100362020-07-11T09:44:27.838-07:00too little, too late<small><a href="http://wbmh42.000webhostapp.com/page1.html">home</a> <a href="https://tsm2.blogspot.com">tsm2</a></small>Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.comBlogger178125tag:blogger.com,1999:blog-544041532485510036.post-69807583995357347242020-07-06T02:45:00.005-07:002020-07-06T02:54:37.911-07:00the fog and the princesRecently, I watched two documentaries that I found quite interesting.<br>
<br>
<a href="https://documentaryheaven.com/the-fog-of-war/">The Fog of War</a> tells the story of Robert McNamara, in particular his experience of the 'cold war' and the Vietnam war; I think every politician should be required to watch it.<br>
It provides several examples of smart men (and Robert McNamara was certainly very intelligent) doing really stupid things ... <br>
<br>
<a href="https://www.youtube.com/watch?v=5-IZZxyb1GI">Princes of the Yen</a> documents the actions of the Bank of Japan after WW2, until and after the bubble burst in 1990.<br> I always feel that I don't know enough about Asia and Japan in particular,
however, I disagree with the extrapolations at the end of the documentary; I do not understand central banks as omnipotent manipulators of the world economy.<br>
Perhaps another documentary should be made about the Federal Reserve, from Alan Greenspan to Jay Powell. <br>
I already have a title: "Clowns of the Dollar". <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com3tag:blogger.com,1999:blog-544041532485510036.post-77308505389496462382020-07-05T03:18:00.002-07:002020-07-05T05:43:54.716-07:00the one percentWe all know that the vast majority of the interweb is just garbage and the swamp continues to grow at an amazing speed.<br>
In fact the swamp animals <a href="https://slatestarcodex.com/2020/06/22/nyt-is-threatening-my-safety-by-revealing-my-real-name-so-i-am-deleting-the-blog/">work hard</a> to get rid of the valuable stuff ... <br>
But there is still the one percent of high quality and recently I found another piece of it: <br>
The lectures of Stanford professor Robert Sapolsky on <a href="https://www.youtube.com/watch?v=NNnIGh9g6fA&list=PL150326949691B199">the biology of human behavior</a>. <br>
I am surprised that we are still allowed to see it ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com6tag:blogger.com,1999:blog-544041532485510036.post-87430739505107883382019-11-11T11:20:00.000-08:002019-11-12T10:35:26.787-08:00gone fishing<img border="0" src="https://3.bp.blogspot.com/-ZLIdL_NvNBo/XYkM0y5g60I/AAAAAAAAArc/xa8mU0VS_X8tY5rADKQgBXIJRYp_IfP9gCNcBGAsYHQ/s1600/gone_fishing.jpg" data-original-width="504" data-original-height="801"><br>
<br>
<small>Paul Klee: <a href="https://www.moma.org/collection/works/33587">Der Angler</a></small><br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.comtag:blogger.com,1999:blog-544041532485510036.post-89154006438839224572019-11-06T04:18:00.001-08:002019-11-06T05:52:12.650-08:00My introduction to RIn previous blog posts I presented an introduction to R in eight steps: <br>
<br>
<a href="http://wbmh.blogspot.com/2019/10/my-introduction-to-r-step-1.html">step 1</a>: Installation of R and RStudio. <br>
<a href="http://wbmh.blogspot.com/2019/10/my-introduction-to-r-step-2.html">step 2</a>: Set working directory and load data.<br>
<a href="http://wbmh.blogspot.com/2019/10/my-introduction-to-r-step-3.html">step 3</a>: Variables and data types.<br>
<a href="http://wbmh.blogspot.com/2019/10/my-introduction-to-r-step-4.html">step 4</a>: Vector slices and linear regression.<br>
<a href="http://wbmh.blogspot.com/2019/11/my-introduction-to-r-step-5.html">step 5</a>: Vector arithmetic and data frames.<br>
<a href="http://wbmh.blogspot.com/2019/11/my-introduction-to-r-step-6.html">step 6</a>: for loops<br>
<a href="http://wbmh.blogspot.com/2019/11/my-introduction-to-r-step-7.html">step 7</a>: Define a procedure and use if ... else.<br>
<a href="http://wbmh.blogspot.com/2019/11/my-introduction-to-r-step-8.html">step 8</a>: Install packages and use external libraries.<br>
<br>
I called it "My introduction ..." because it emphasizes what I find important and interesting in R, rather than a tutorial of R as just another programming language. <br>
Perhaps R is an acquired taste, but it has become one of my preferred tools to understand the world ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-17025555974517498322019-11-06T03:48:00.003-08:002019-11-06T03:53:14.737-08:00My introduction to R - step 8R is open source and many people have contributed and continue to contribute procedures, libraries and packages - and we have access to all of them. <br>
Perhaps we want to take a look at <a href="https://en.wikipedia.org/wiki/Kernel_regression">kernel regression</a>, one of many machine learning methods.<br>
Wikipedia even has <a href="https://en.wikipedia.org/wiki/Kernel_regression#Script_for_example">a script for us</a>. <br>
<br>
In order to try out the procedure npreg(), we install the package np and open its library of procedures <br>
install.packages("np") <br>
library("np") <br>
<br>
Instead of using the procedure install.packages() one can also select Tools > Install Packages ... from the RStudio menu. <br>
<br>
We then load the data we want to examine <br>
ryder = read.csv("R.csv",header=T) <br>
<br>
In this example, we try to explain the volume (in thousand shares) from the high - low range <br>
y = 0.0001*ryder$Volume <br>
x = ryder$High - ryder$Low <br>
<br>
Now we can build the non-parmateric model <br>
mdl = npreg( y ~ x ) <br>
and display it together with the data points <br>
plot( mdl ) <br>
points( x, y, col="blue" ) <br>
<br>
<img border="0" src="https://3.bp.blogspot.com/-cIaGmJwQJfI/XcKxu3R0snI/AAAAAAAAAuU/h8sv7Hb5IWUYNfIIjNRlF-HIO06boubXACNcBGAsYHQ/s1600/Rstd.png" data-original-width="1100" data-original-height="730"> <br>
<br>
exercise: Put the cursor next to the npreg procedure and hit F1 to get the help file. This tells us that npreg uses the parameter bws to set the bandwith (we just used a default). Use the procedure npregbw() to calculate the bandwith before calling npreg. <br>
Hint: There are examples at the end of the helpfile ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-62000027096713473132019-11-05T04:09:00.000-08:002019-11-05T04:16:05.909-08:00My introduction to R - step 7We have used several procedures that come with the R base installation, e.g. plot, lm, read.csv, etc. <br>
But we can also define <a href="https://www.statmethods.net/management/userfunctions.html">our own procedures</a>. <br>
In the previous step we calculated the "exponential moving average" of a series of prices; perhaps we want to do this more than once. <br>
In this case it makes sense to define a procedure, which we will call MyEma <br>
MyEma = function( prc ){ <br>
L = length(prc) <br>
ema = numeric(L) <br>
ema[1] = prc[1] <br>
for( i in 2:L ){ <br>
ema[i] = 0.9*ema[i-1] + 0.1*ryder$Close[i] <br>
} <br>
return(ema) <br>
} <br>
<br>
We define our procedure MyEma to have 1 parameter, a vector of prices, then we perform the same calculation as in the previous step (you can actually copy and paste the code) and finally we return the exponential moving average vector as the result of our procedure. <br>
<br>
In the main body of our script we can then call the procedure <br>
ema = MyEma( ryder$Close ) <br>
with ryder$Close as the input. <br>
<br>
If all goes well the plot should be the same as in the previous step ... <br>
<br>
<img border="0" src="https://2.bp.blogspot.com/-PDKRayjOltw/XcFkBcpybsI/AAAAAAAAAuA/RGPPWv7Lb2I1IOHnHt3XG4MaC_934YbYACNcBGAsYHQ/s1600/Rstd1.png" data-original-width="1100" data-original-height="728"> <br>
<br>
There is only one issue: The loop assumes that there is more than one element in the vector prc and the whole procedure makes little sense if there are less than 3 elements in the prc vector. We should therefore check the length L and only do the loop IF L is larger than 2, otherwise just return the prc as it is. <br>
if( L > 2 ){ <br>
for-loop <br>
}
else{ <br>
return(prc) <br>
} <br>
<br>
This is depicted below. <br>
<br>
<img border="0" src="https://3.bp.blogspot.com/-z2dUn4_ea94/XcFlRDP_DTI/AAAAAAAAAuI/Bqg6MDabrQEuL7sRSnveQcmQWdxoI24TwCNcBGAsYHQ/s1600/Rstd2.png" data-original-width="1100" data-original-height="732"><br>
<br>
exercise: Use a 2nd parameter w in MyEma, so that <br>
MyEma = function( prc, w ){ <br>
and <br>
ema[i] = (1.0 - w)*ema[i-1] + w*ryder$Close[i] <br>
<br>
Call MyEma with different values of w and check how the plot changes <br>
MyEma( ryder$Close, 0.1) <br>
MyEma( ryder$Close, 0.05) <br>
MyEma( ryder$Close, 0.2) <br>
etc. <br>
<br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-2559234925168655212019-11-04T03:27:00.000-08:002019-11-04T03:31:15.003-08:00My introduction to R - step 6Many investors prefer to sell stocks if they "enter into a down trend" - they use e.g. an exponential moving average and sell if the price falls below it. <br>
It is not clear if this actually improves the performance of a a stock portfolio, but perhaps investors sleep better using this approach ... <br>
<br>
There is no "exponential moving average" procedure in the R base package, but it can be easily calculated with a <a href="https://www.tutorialspoint.com/r/r_for_loop.htm">for-loop</a>. <br>
<br>
After loading the stock data file <br>
ryder = read.csv("R.csv",header=T) <br>
L = length(ryder$Close) <br>
<br>
we create the vector ema <br>
ema = numeric( L ) <br>
<br>
We set the first element of ema to the first close price <br>
ema[1] = ryder$Close[1] <br>
<br>
and then we calculate <br>
ema[2] = 0.9*ema[1] + 0.1*ryder$[2] <br>
ema[3] = 0.9*ema[2] + 0.1*ryder$[3] <br>
. <br>
. <br>
. <br>
in a loop: <br>
<br>
for( i in 2:L ){ <br>
ema[i] = 0.9*ema[i-1] + 0.1*ryder$Close[i] <br>
} <br>
<br>
Finally, we display the prices and ema <br>
plot( ryder$Close, type = "l", col = "blue" ) <br>
lines( ema, type = "l" , col = "red" ) <br>
<br>
<img border="0" src="https://4.bp.blogspot.com/-Q7UAQSw1Am0/XcAJSABxZuI/AAAAAAAAAt0/GZdZcg9rXG4C1urHJ7H4f2iujt5D9alaACNcBGAsYHQ/s1600/Rstd.png" data-original-width="1100" data-original-height="733"> <br>
<br>
At this point most tutorials would emphasize that R is an interpreted language and for-loops should be avoided at all costs. <br>
Indeed one should use vector operations whenever possible instead of the element-by-element processing in a for loop. <br>
However, microprocessors are so fast nowadays, that for-loops are problematic only for really large data sets imho. <br>
<br>
exercise: Repeat the calculation, but with the volume instead of the price. <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-63384541540193698912019-11-01T03:47:00.001-07:002019-11-01T04:20:17.807-07:00My introduction to R - step 5An important feature of R is that one calculates with vectors and therefore can process large quantities of data in a single line. <br>
Let's take the data from previous steps <br>
ryder = read.csv("R.csv",header=T) <br>
and calculate the "trading range", normalized by the open, for every day <br>
tRng = ( ryder$High - ryder$Low )/ ryder$Open <br>
<br>
This generates the vector tRng , calculates the difference of high and low for every day, divided by the open and assigns the result to the elements of tRng, i.e. 251 * 2 calculations, all in one line. <br>
<br>
We can now add this vector to the data frame ryder <br>
ryder$TR = tRng <br>
<br>
Now let's calculate the dollar trading volume in thousands for each day and add it as a column <br>
ryder$dVol1000 = 0.001*ryder$Close * ryder$Volume <br>
<br>
We can take a look at the first entries of the data frame with the head() procedure <br>
head(ryder) <br>
but we would see the same thing in window 3 top right. <br>
<br>
If we want to store the expanded data frame in a file, we could do it as follows <br>
write.csv( ryder, "Rnew.csv", row.names=F, quote=F ) <br>
I set the parameters so that it has the exact same format as R.csv. <br>
You can get help with <br>
help("write.csv") <br>
<br>
The columns of ryder are: Date, Open, High, Low, Close, Adj.Close, Volume, ... <br>
and we can access each column by its name <br>
print( ryder$Close[3] ) <br>
But we can also access the elements of a data frame directly <br>
print( ryder[3,5] )<br>
The first index is the row and the second the column (Close is the 5-th column of ryder). <br>
<br>
We can also slice data frames <br>
df1 = ryder[100:200, ] <br>
head( df1 ) <br>
Notice that the blank entry, instead of an index, means all columns. <br>
<br>
df2 = ryder[ , 1:5] <br>
head( df2 ) <br>
The blank entry, instead of an index, means all rows. <br>
<br>
Until now, I have not mentioned the column Date and for a good reason - it is a bit of a mess. <br>
The read.csv procedure interprets it as a <a href="https://www.tutorialspoint.com/r/r_factors.htm">Factor</a> and not a date, although the entries are formatted so that R can interpret it as date. <br>
<br>
But we can fix that <br>
Dt = as.Date( ryder$Date ) <br>
ryder$Date = Dt <br>
help("as.Date") <br>
<br>
The as. family of conversion functions is quite useful in R. <br>
<br>
This allows us to slice the data frame ryder in yet another way ...<br>
r19 = ryder[ryder$Date > "2019-01-01",] <br>
head( r19 ) <br>
<br>
... and concludes this step of my introduction. <br>
<br>
exercise: Calculate the returns of ryder for each day, beginning with the 2nd day. <br>
The return on the 2nd day is ( ryder$Close[2] - ryder$Close[1] )/ryder$Close[1] , <br>
the return on the 3rd day is ( ryder$Close[3] - ryder$Close[2] )/ryder$Close[2] , <br>
etc.
Now calculate it in one line and assign the results to a vector Ret. <br>
hint: Use L = length(ryder$Close) in your calculation ... <br>
<br>
<img border="0" src="https://4.bp.blogspot.com/-yED8yhcg9Ds/XbwRiXs6ftI/AAAAAAAAAto/pXJi2BJDH6UReDCPWxnkV-UPGB-8rLvCACNcBGAsYHQ/s1600/Rstd.png" data-original-width="1100" data-original-height="730"><br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.comtag:blogger.com,1999:blog-544041532485510036.post-136521952105081262019-10-31T03:48:00.003-07:002019-10-31T04:00:52.383-07:00My introduction to R - step 4Linear regression is the oldest machine learning method. It is widely used and allows one to extrapolate from the known to the unknown. <br> Large fortunes have been made and lost with the help of linear regression models ...<br>
In the following we will calculate a linear model on a sample of stock prices and then compare it against stock prices "out of sample". <br>
<br>
If you start RStudio, it might show an R script with leftovers from the previous exercise - I suggest you create a new script (menu bar: File > New File > R Script). <br>
<br>
We read the R.csv file from step 2 with read.csv: <br>
ryder = read.csv("R.csv",header=T) <br>
and then store the length of the vector ryder$Close: <br>
L = length(ryder$Close). <br>
<br>
We calculate two variables we will later use for displays: <br>
maxP = max(ryder$Close) + 5.0 <br>
minP = min(ryder$Close) - 5.0 <br>
<br>
The file should contain more than 250 data points (one year of stock prices) and we use the first 200 days for <i>in sample</i> estimation. <br>
days = 1:200 <br>
prc = ryder$Close[days] <br>
<br>
Notice that ryder$Close is a vector and ryder$Close[1] is the first element we want and ryder$Close[200] the last of the in-sample period.
ryder$Close[days] is equivalent to ryder$Close[1:200] and therefore prc is a vector which stores the first 200 elements of ryder$Close. <br>
This <i>slicing</i> of vectors is quite often used and would work even if the elements of days would not be sequentially ordered. <br>
<br>
Now we can plot the prices as a function of each day: <br>
plot( days, prc, ylim = c(minP,maxP) ) <br>
<br>
We calculate the linear regression model with the lm() procedure: <br>
mdl = lm( prc ~ days) <br>
Notice the ~ used in the procedure call (which may or may not not be easy to find on a non-US keyboard). <br>
We can print a summary of the linear model with <br>
summary(mdl) <br>
and we get the two coefficients (intercept and slope) using coef(mdl), which returns a vector. <br>
Therefore we can calculate the linear model as <br>
lin = coef(mdl)[1] + coef(mdl)[2]*days <br>
<br>
and add the line to our plot with the lines() procedure: <br>
lines( days, lin, type="l", col="red") <br>
<br>
<img border="0" src="https://2.bp.blogspot.com/-K0Ruf2CXw2k/Xbq5KuymztI/AAAAAAAAAtQ/aGR0DSWtj4gUA-NB6N1__Sxq80dmQWlpACNcBGAsYHQ/s1600/Rstd.png" data-original-width="1000" data-original-height="633"><br>
<br>
You can either execute your script step by step with Ctrl-Enter or type the script first and then execute the whole thing by selecting from the menu: Code > Run Region > Run All <br>
<br>
Now we look at the out-of-sample data: <br>
days = 201:L <br>
prc = ryder$Close[days] <br>
and display it with<br>
plot( days, prc, ylim = c(minP,maxP) ) <br>
<br>
We calculate the out-of-sample model <br>
lin = coef(mdl)[1] + coef(mdl)[2]*days <br>
and add the line to the plot <br>
lines( days, lin, type="l", col="red") <br>
<br>
<img border="0" src="https://1.bp.blogspot.com/-f-6SG9C0Des/Xbq6_aSymSI/AAAAAAAAAtc/Zm13cf0eKg8Opj1Z3PE7zSM6lth2ZJUWQCNcBGAsYHQ/s1600/Rstd2.png" data-original-width="1000" data-original-height="632"><br>
<br>
We could now calculate the out-of-sample error (it is quite obvious that the error exceeds the variance of the data in this example 8-) and perhaps repeat the procedure for many different stocks and time periods to check if the linear model has any useful predictive value. <br>
However, this concludes step 4 of my introduction <br>
<br>
exercise: Repeat this regression exercise, but use the Volume instead of the Close ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-80263247955469811132019-10-30T04:15:00.000-07:002019-10-30T05:19:59.487-07:00My introduction to R - step 3In the previous two steps we encountered variables and constants of different types. <br>
Let's take a closer look ... <br>
<br>
In R one creates variables by giving them <a href="https://www.tutorialspoint.com/r/r_variables.htm">a name</a> and assigning a value, as we did with <br>
the_answer = 6*7 <br>
<br>
The name can consist of letters, numbers and the two characters _ and . <br>
but do not use _ or . or a number as the first character.<br>
Examples of valid names: <br>
var1 <br>
the_strength_of_Luisa <br>
dog.leg <br>
<br>
There are reserved words, which cannot be used to name variables, you can get a list with
the help procedure: <br>
help(reserved) <br>
<small>You probably don't want this line in your R script, so I suggest you type help(reserved) in window 2 bottom left
and hit Enter. Indeed window 2 is a fully functional R terminal and I use it to try out things and keep whatever
code I want saved in window 1, i.e. in my R script. </small> <br>
<br>
Whenever we create a variable, R figures out the data type from the assigned value and/or operation(s). <br>
We already encountered several different data types: <br>
<br>
logical: TRUE or FALSE , abbreviated as T or F (e.g. the parameter header=T in the read.csv procedure) <br>
<br>
numeric: the_answer = 6*7 was our first example, 3.1415 would be another <br>
<br>
integer: R does not distinguish 6 from 6.0 , but if one wants to explicitly use a whole number <br>
it needs do be indicated with the letter L, e.g. 6L <br>
the_answer = 6L*7L <br>
is now an integer and not a numeric variable. <br>
<br>
strings: We have used the string "blue" in the plot procedure and one can display strings e.g. with the print procedure <br>
print("blue") <br>
<br>
<br>
R uses <i>vectors</i> as basic building blocks, collections of elements with the same data type. <br>
ryder$Close was an example of a vector. <br>
But the_answer was a vector too, just a small vector with 1 element only.<br>
We access the elements of a vector with the [] operator, so that <br>
ryder$Close[3] <br>
would be the 3rd element of the vector, i.e. the 3rd entry of the data column. <br>
And the_answer[1] would be the one and only element of the vector the_answer. <br>
Notice that vector indices begin with 1 and not 0 as in some other programming languages. <br>
<br>
One can generate a vector e.g. with the function c(), used so often that it has a really short name: <br>
vec1 = c(1.1, 2.7, 3.2, 4.6) <br>
creates a numeric vector with 4 elements. <br>
vec2 = c("me","my","friend","and","you")<br>
creates a vector with 5 strings as elements. <br>
<br>
Last but not least, the : operator can be used to create a specific vector of integers <br>
vec3 = 2:7 <br>
creates a vector with 5 integers as elements, the whole numbers 2, 3, 4, 5, 6, 7. <br>
<br>
<img border="0" src="https://2.bp.blogspot.com/-iRS5wC61jaQ/Xbl3huJ_ptI/AAAAAAAAAtE/vzZdYQBIZTci2dpvc34nu_uBea4xP6oQQCNcBGAsYHQ/s1600/Rstudio1.png" data-original-width="1000" data-original-height="670"><br>
<br>
exercise: Create vectors of different sizes and types - watch in window 3 what it displays for each one. <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-43961095217636972962019-10-29T03:31:00.001-07:002019-10-29T05:37:34.047-07:00My introduction to R - step 2R is mainly used for statistics, machine learning etc. and to do that we need interesting data. <br>
One place which generates a lot of data is the US stock market and therefore we head over to <br>
<a href="https://finance.yahoo.com/">finance.yahoo.com</a> <br>
to grab some interesting free samples. <br>
On the right hand side there is a box <i>Quote Lookup</i> and we enter R as the ticker symbol,
which gives us price and other information for Ryder System Inc. - a company which has little to do with
the R programming language. <br>
We click on <a href="https://finance.yahoo.com/quote/R/history?p=R">historical data</a>, select a time period (1 year is fine),
push the "Apply" button and then click on "Download Data".<br>
Save the file <i>R.csv</i> to the <i>myR</i> folder (or wherever you like to store it). <br>
<br>
Now it is time to start RStudio and it will probably open with the one-line script we made in the previous step. <br>
However, we already know <i>the_answer</i> and we "comment out the line" by putting a # character in front of it. <br>
R ignores comments and RStudio colors them green, they are only there for us human beings to better understand what we
did and want to do ... <br>
<br>
Before we take a look at the R.csv file, we set the "working directory" in RStudio: In the menu click on <i>Tools</i>
and select <i>Tools > Global Options ...</i> and then select <i>General</i> (which should be the default selection anyways).
Go to "Default working directory ..." and select the path to your <i>myR</i> folder (or wherever you stored the R.csv file) by
pushing the <i>Browse</i> button; then hit apply and eventually this will need a restart of RStudio to take effect. <br>
Alternatively, one can call the R procedure <i>setwd</i> in the R script to set that path: <br>
setwd("c:/path/to/my/folder/myR") <br>
Notice that R uses forward slashes, even on windows, betraying its unix heritage. <br>
<br>
Now we are ready to load the stock data of Ryder System Inc. using the <i>read.csv</i> procedure:<br>
ryder = read.csv( "R.csv", header=T ) <br>
<br>
After we execute the line with Ctrl-Enter, window 3 top right will display the variable <i>ryder</i> and by clicking on the arrow next to it we see more of what it contains. <br>
This is how RStudion looks at this point:<br>
<br>
<img border="0" src="https://2.bp.blogspot.com/-f0PizwCxxa0/XbgNTGch5EI/AAAAAAAAAss/oieVKBs87Ags6d19Dj4x-J9PgMviShjswCNcBGAsYHQ/s1600/Rstudio.png" data-original-width="1000" data-original-height="620"> <br>
<br>
The columns that we saw on the Yahoo webpage are all there: Date, Open, High, ... <br>
R tells us what type they are, num for decimal number, int for integers, etc. and shows us some examples. <br>
In other words, read.csv converts the comma separated values (aha, this is what csv stands for) of the file into a collection of variables, which is called <i>dataframe</i> in R. <br>
<br>
We can access each column in the dataframe using its name and the $ operator, e.g. ryder$Close <br>
This works, because we used header=T in the read.csv procedure (T stands for TRUE). <br>
<br>
If the data comes in a different file format, e.g. variables separated by tabs is popular, the <i>read.table</i> procedure might
be used to <a href="">import data into R</a>. <br>
<br>
We will now take a first look at the data using the <i>plot</i> procedure: <br>
plot( ryder$Close, type="l", col="blue" ) <br>
<br>
You may notice that a window popped up, listing the available columns in <i>ryder</i> while you typed. You can use that window to select <i>Close</i> without further typing.<br>
RStudio now looks like this: <br>
<br>
<img border="0" src="https://1.bp.blogspot.com/-gk-CcmBIHC0/XbgSHeFhw5I/AAAAAAAAAs4/cuNAv0VkeP0AyskcWeQjgTXMxtY1E20bQCNcBGAsYHQ/s1600/Rstudio2.png" data-original-width="1000" data-original-height="633"><br>
<br>
This concludes the 2nd step of my introduction. Don't forget to save your R script with <i>File > Save</i> in the menubar.<br>
<br>
exercise: Click on the line with the plot procedure and then hit F1. The help text for the plot procedure should appear in window 4, bottom right. <br>
Try different types and colors with your plot ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-64582830422435444862019-10-28T03:58:00.005-07:002019-10-28T06:28:22.138-07:00My introduction to R - step 1You want to know how to actually do machine learning, or you want to know how those finance quants do their job, or you just want
to add a valuable skill to your cv ... <br>
In other words, you want to learn <a href="https://en.wikipedia.org/wiki/R_(programming_language)">R</a> (btw what programming language do pirates use? Rrrrrrr ). <br>
But you want to learn in small steps, easy to follow along and yet with visible results already after a few steps.
Well, you have come to the right place and as additional benefit you can post questions and comments whenever you
want or need to know more ...<br>
<br>
Just one important disclaimer: I am just another user, perhaps with a bit more experience than you at the moment; but
I still peek into my <a href="https://www.amazon.com/R-Dummies-Andrie-Vries/dp/1119055806">R for Dummies</a> book every now and then. <br>
I am certainly not <a href="https://www.instagram.com/officialrguru/?hl=en">an R guru</a>. <br>
<br>
The first thing we need to do is <a href="https://courses.edx.org/courses/UTAustinX/UT.7.01x/3T2014/56c5437b88fa43cf828bff5371c6a924/">install R and Rstudio</a>. <br>
<br>
Install R: Go to <a href="https://www.r-project.org">www.r_project.org</a>, click on <a href="https://cran.r-project.org/mirrors.html">download R</a> and select a mirror.<br>
If you live e.g. in the UK, you might select <a href="https://cran.ma.imperial.ac.uk">the one from Imperial College of London</a>. <br>
There you select your operating system and click on <a href="https://cran.ma.imperial.ac.uk/bin/windows/base/">install R for the first time</a> (if you are on Windows) or save the <a href="https://cran.ma.imperial.ac.uk/bin/macosx/R-3.6.1.pkg">R-3.61.pkg</a> package (if you are on a Mac), or whatever is the latest package. Linux users need to select their distribution etc. <br>
<br>
Install RStudio: Go to <a href="https://rstudio.com/">rstudio.com</a> and click on the download rstudio button. Choose the free version of RStudio Desktop and select the installer for your operating system or Linux distribution etc. ... <br>
<br>
If you have problems with the installation, please post a comment or ask Google for help. <br>
<br>
But if all goes well, you should be able to start RStudio and it will look like this:<br>
<br>
<img border="0" src="https://2.bp.blogspot.com/-LFODJD8ZqOU/XbbLotE8sCI/AAAAAAAAAsQ/lNl6BHEqXMo7-9axgV-RvKiEBsNbT5M2wCNcBGAsYHQ/s640/R_start.png" width="640" height="512" data-original-width="1203" data-original-height="963"><br>
<br>
Click on <i>File</i> in the menu bar and select <i>File > New File > R script</i>. <br>
RStudio will now look like this:<br>
<br>
<img border="0" src="https://4.bp.blogspot.com/-5VyOdYcd3tU/XbbMElQdbpI/AAAAAAAAAsY/5xH4cbBRkPsbEdovAxWOeIImQWI4FRDvACNcBGAsYHQ/s640/R_4parts.png" width="640" height="497" data-original-width="1197" data-original-height="929"><br>
<br>
It contains 4 sub-windows and I have scribbled numbers into the screenshot to better explain what they are.<br>
1> top left: This window displays our R script and we will edit it there. <br>
2> bottom left: This window shows executed commands, error messages, etc. <br>
3> top right: This window shows all the different data and variables we will generate. <br>
4> bottom right: This window is used for various displays, help text etc. <br>
<br>
In order to get really started, we type our first R script in sub-window 1 and it contains only one line: <br>
the_answer = 7*6 <br>
After typing that, with the cursor still on the line, press Ctrl-Enter to "execute" it. <br>
Alternatively, we could have selected <i>Code</i> from the menu bar and then "Run Selected Line(s)". <br>
The RStudio screen should now look like this: <br>
<br>
<img border="0" src="https://1.bp.blogspot.com/-uA3WmugQgLE/XbbMd6M0KyI/AAAAAAAAAsg/hBM_MbbrImkOtRSwy8QdlVK52q-CJx_0wCNcBGAsYHQ/s640/R_answer.png" width="640" height="498" data-original-width="1199" data-original-height="933"> <br>
<br>
In the top left window 1 we still see our R script, containing one line. <br>
In the bottom left window 2 we see that R executed our line without error and <br>
in the top right window 3 we see that R created a variable named <i>the_answer</i> with the value 42.<br>
R actually did three things: It created <i>the_answer</i>, executed the arithmetic operation 7*6
and then assigned the outcome of that operation to <i>the_answer</i>. <br>
<br>
I read that some people have a problem with the = operator when learning to program in some cases. R has a solution for that,
one can also use the assignment operator <- instead of the equal sign. So we could have written <br>
the_answer <- 7*6 <br>
with the exact same outcome. In older texts this assignment operator is often used instead of = and you should know
that it really makes no difference. <br>
<br>
Now we want to save our script and I recommend that you create a folder somewhere on your pc, which you will use
to store the R scripts and data files we use in this tutorial; I named my folder <i>myR</i> and will reference it
in future steps with this name. <br>
Once you have created and/or selected a place on your pc, select <i>File</i> on the menu bar, click on <i>Save As...</i>,
navigate to <i>myR</i> and choose a name for your script, e.g. first_step.R <br>
I recommend that your script files end with .R <br>
<br>
This concludes the first step of my introduction. <br>
<br>
exercise: Click on <i>Help</i> in the menu bar, select <i>R Help</i> and browse e.g. "An Introduction to R", in window 4. <br>
<br>
Just one more thing. At the end of your RStudio exercise, select <i>File</i> from the menu and click on <i>Quit Session...</i>; if you are prompted to save the <i>workspace image</i> select <i>No</i>, which means that the next time you start RStudio, you start from a clean slate. <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-27098237306490965062019-09-03T03:02:00.002-07:002019-09-03T03:02:47.441-07:00quoraCIP mentioned quora and I found a few interesting pictures there ... <br>
<br>
<img border="0" src="https://4.bp.blogspot.com/-OY2NU5X3MyY/XW45JAf3CAI/AAAAAAAAAqs/7CTF3rYt1cIVCWFt4rXXGZRdXTzN8AJKACLcBGAs/s1600/nereis_sandersi_deep_sea_vent_worm.jpg" data-original-width="602" data-original-height="554"/> <br>
Nereis Sandersi, a deep sea vent worm. <br>
<br>
<br>
<img border="0" src="https://1.bp.blogspot.com/-FzApXQ2sq8M/XW45rLZdswI/AAAAAAAAAq0/Ke1b5ZwyhDMN3KtWedPi3_5FOoVYPSoSgCLcBGAs/s1600/red_blood_cell_on_needle.jpg" data-original-width="473" data-original-height="473" /><br>
Red blood cell on a needle. <br>
<br>
<br>
<img border="0" src="https://2.bp.blogspot.com/-7NCqWJuH3II/XW459A3W-wI/AAAAAAAAAq8/QK96TMRDl9ksyLyCImmSwuqoq0kWAHaoQCLcBGAs/s1600/human_embryo_on_pin.jpg" data-original-width="323" data-original-height="406" /><br>
Human embryo on a pin.<br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com0tag:blogger.com,1999:blog-544041532485510036.post-43940390150732487782019-09-01T03:06:00.001-07:002019-09-01T04:52:56.589-07:00Where have all the crackpots gone?Crazy people are still everywhere, but I am interested in the special case of physics and math crackpots.
In the good old days of webpages, usenet and blogs they were always there, explaining the real truth about physics and math
with their animated gifs and blinking headlines.<br>
I remember quantoken, plato, plutonium and a young lady who was convinced black holes are driving volcanoes,
but there were many more and it seems that they all disappeared from my internet. <br>
What happened to the crackpots? <br>
<br>
Perhaps my internet habits changed, but google trends suggests that something changed indeed.<br>
<br>
<img border="0" src="https://2.bp.blogspot.com/-LapIg5AZRw8/XWuVqyo2sfI/AAAAAAAAAqY/IpnGpdF_n-snpXbx53TpLS3c4xnHybf-QCLcBGAs/s320/crackpot.png" width="320" height="81" data-original-width="1148" data-original-height="290"/><br>
google trends: "crackpot", 2004 - 2019<br>
<br>
<img border="0" src="https://3.bp.blogspot.com/-XdELthbCWIA/XWuWCFv6rtI/AAAAAAAAAqg/okL0n-QpjX0h6yF1D6fKbq5iplJl4fdUQCLcBGAs/s320/crackpot_index.png" width="320" height="78" data-original-width="1149" data-original-height="279"/><br>
google trends: "crackpot index", 2004 - 2019<br>
<br>
I am thinking "crackpot index" is a good proxy for a search related to physics and math crackpots.<br>
Furthermore, I did a simple twitter search for "crackpot" and "crackpot physics" and found nothing related to the category I am talking about.<br>
There is still <a href="http://www.vixra.org">viXra</a>, but the number of papers posted there is surprisingly small (a total of 31k vs 1.5M on arXiv *).<br>
<br>
So what happened to them? Did they all move on from disproving relativity and quantum theory to disproving the moon landings? Did they all become 9/11 truthers etc.? Or does the noise and general madness on facebook and twitter drown them out? <br>
<br>
They might be an overlooked species, threatened by extinction, if we don't act soon ... <br>
<br>
<br>
(*) <small>I do not want to suggest that all papers on viXra are crackpot material, I read somewhere that about 15% get published in journals (whatever that means nowadays), and a significant part of arxiv is garbage.</small><br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com4tag:blogger.com,1999:blog-544041532485510036.post-61544410448863249022019-08-30T02:37:00.001-07:002019-09-23T11:22:14.437-07:00How not to die ... A few things changed during the last six months. <br>
<br>
We moved from The Bahamas to Malta; one advantage is that I don't need to follow the track of hurricane <i>Dorian</i> closely.<br>
<br>
We moved to a plant based diet, after reading Dr. Greger's book <a href="https://www.amazon.com/How-Not-Die-Discover-Scientifically/dp/1250066115">How Not To Die</a>. <br>
If you are worried about heart attack, stroke, cancer and all that you may want to <a href="https://nutritionfacts.org">visit his webpage</a>. <br>
Btw a while ago there was some back and forth with <a href="http://capitalistimperialistpig.blogspot.com/">CIP</a> about the paleo-diet; meanwhile I learned that <a href="https://nutritionfacts.org/video/paleopoo-what-we-can-learn-from-fossilized-feces/">the real paleo diet</a> was mostly plant based with very <a href="https://nutritionfacts.org/2014/09/23/will-the-real-paleo-diet-please-stand-up/">high amounts of fiber</a>. <br>
<br>
I go the gym now every day, do breathing exercises and try to improve my sleep; it is not easy getting old. <br>
<br>
Last but not least, I try to exercise my brain to delay the onset of dementia - but I forgot why ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com5tag:blogger.com,1999:blog-544041532485510036.post-77919892457362928742019-08-28T02:37:00.004-07:002019-09-23T11:22:49.690-07:00To blog or not to blog ...... that is the question. <br>
<br>
<br>
added later: <br>
<br>
Sean published yet <a href="https://www.penguinrandomhouse.com/books/566988/something-deeply-hidden-by-sean-carroll/9781524743017/">another book</a> promoting the many worlds interpretation. I did not read it, only <a href="http://www.math.columbia.edu/~woit/wordpress/?p=11128">saw a short review</a>. <br>
<br>
Obviously, they don't read my blog(s) - otherwise they would know why m.w.i does not work: <a href="http://tsm2.blogspot.com/2018/04/nothing-ever-happens.html">link 1</a> and <a href="https://tsm2.blogspot.com/2014/08/the-many-worlds-interpretation-does-not.html">link 2</a>. <br>
<br>
So why write blog posts that nobody reads? Well, there is a good chance that <i>Black Mirror</i> has it right (as usual); my experience is just the result of some simulation (btw if you believe the m.w.i. then <a href="https://tsm2.blogspot.com/2012/06/many-simulated-worlds.html">you have to believe that</a>) and so the blog posts I wrote are for a higher being, who certainly appreciates the wisdom of my thoughts, otherwise why would She keep the simulation alive ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com3tag:blogger.com,1999:blog-544041532485510036.post-71279272357863543562019-02-08T12:05:00.002-08:002019-08-25T09:10:34.971-07:00SabinebloggingRight now <a href="https://www.scottaaronson.com/blog/?p=4122">it seems to be a thing</a> to have an opinion about S.H.'s opinions (*). <br>
I don't really care that much about her opinions, but as a follower of internet fashion I read <a href="http://backreaction.blogspot.com/2019/02/a-philosopher-of-science-reviews-lost.html">her latest blog post</a> and I found the last sentence interesting: <br>
"The easiest way to see that the problem exists is that they deny it." <br>
<br>
So you can either agree with her and support her argument, or you can deny it, which also supports her argument. <br>
I find it interesting that the rhetorical tricks of the dark ages are now entering the scientific discourse ... <br>
<br>
<br>
<small>(*) Btw the comments made by <i>wolfgang</i> over there are not mine.</small><br>
<br>
added much later: It seem that <a href="https://www.hollywoodlanews.com/sabine-hossenfelder-physicist-lubos-motl-blogger/">Sabine is going to sue her most aggressive critic in court</a>.<br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com4tag:blogger.com,1999:blog-544041532485510036.post-21118304848329890212019-02-02T09:37:00.001-08:002019-02-02T09:41:27.756-08:00the ABC conjectureThree people at a party: Alex is married, we don't know much about Betty and Chris is unmarried. <br>
We notice that Alex is constantly staring at Betty, but Betty is only looking at Chris all the time. <br>
This seems to be yet another case of a married person looking for too long at an unmarried person. <br>
But can we be sure? What is the probability that this ABC conjecture is true? <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com7tag:blogger.com,1999:blog-544041532485510036.post-40693838827337598752019-01-19T08:01:00.001-08:002019-01-19T20:05:17.092-08:00Just some links ...... you have probably seen before, in other words too little too late as usual. <br>
<br>
Oumuamua is <a href="https://www.vox.com/science-and-health/2018/11/6/18068236/oumuamua-cigar-shaped-comet-asteroid-alien-spaceship-light-sail-harvard-astrophysical-journal">probably not an alien spaceship</a>, but there are many <a href="https://www.youtube.com/watch?v=gypAjPp6eps">weird</a> and <a href="https://en.wikipedia.org/wiki/KIC_8462852">mysterious</a> objects in the universe.<br>
<br>
I think <a href="https://deepmind.com/blog/alphafold/">AlphaFold</a> is so far the most interesting achievement of 'deep learning' and I assume that <a href="https://www.bloomberg.com/news/features/2018-06-12/a-quant-king-and-a-drug-hunter-join-in-a-quest-to-find-new-cures">computational (bio)chemistry</a> will make big steps in coming years.<br>
<br>
The <a href="https://arxiv.org/abs/1811.12905">paper of Kelly and Trugenberger</a> examines 'combinatorial quantum gravity' on random graphs. I find it very interesting, because they claim to get a 2nd order phase transition, i.e. a continuum limit, not seen in <a href="http://wbmh42.000webhostapp.com/files/files.html">lattice gravity models</a> so far. <br>
<br>
A <a href="http://brontecapital.blogspot.com/2019/01/the-myth-of-capitalism-monopolies-and.html">book review and some thoughts</a> about the value of french fries that I found interesting. <br>
<br>
Last but not least, a webpage with <a href="https://futurecrun.ch/goodnews">lots of good news</a>.<br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com1tag:blogger.com,1999:blog-544041532485510036.post-18624527727488650712019-01-03T08:53:00.000-08:002019-01-04T08:31:42.547-08:001995When did everything become so stupid? <br>
<br>
Recently I was wondering when it happened, perhaps with the idea that it might help identify the cause. I think I found the answer. <br>
It would be easy to set this date at 2016, but I think it would also be wrong; just think about all that happened before. <br>
Of course, stupidity is nothing new, idiotic politicians are nothing new and mass hysteria and conspiracy theories have always been part of history. <br>
But something changed for the worse in the last one or two decades and it all began in 1995 imho. <br>
<br>
It was the year of the OJ trial, when news turned into a weird soap opera for the first time and a strange chain of cause and effect gave us the Kardashians. <br>
Around the same time <a href="https://en.wikipedia.org/wiki/Non-linear_editing_system#The_1990s">non-linear video editing</a> became available, which initially made reality tv cheap to produce and finally made it possible for everybody to make video clips. <br>
The drudgereport was also launched in 1995, paving the way for breitbart and infowars.<br>
But most importantly, it was the year of win95, which finally made the internet <a href="https://www.youtube.com/watch?v=TLfZ5Sb1EGw">available to everybody with a pc</a> (*). <br>
<br>
The avalanche of stupidity that we experience now was an inevitable consequence of that year ... <br>
<br>
<br>
(*) <small>The <a href="https://en.wikipedia.org/wiki/Eternal_September">Eternal September</a> began already in 1993 and I admit that there is some uncertainty in the exact timing of the onset of the stupidity avalanche. </small><br>
<br>
<br>
added later: One other data point to consider is the <a href="https://www.sciencealert.com/iq-scores-falling-in-worrying-reversal-20th-century-intelligence-boom-flynn-effect-intelligence">reversal of the Flynn effect</a>: It suggests that IQ declined for post-1975 cohorts; this decline would have begun to show up in adults around 1995. <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com9tag:blogger.com,1999:blog-544041532485510036.post-60551153263778831202018-12-31T09:53:00.001-08:002018-12-31T10:52:57.124-08:00via bandersnatch<iframe width="560" height="315" src="https://www.youtube.com/embed/mfsYSPCNWCw?showinfo=0" frameborder="0" allowfullscreen></iframe><br>
<br>
Happy New Loop everybody! <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.comtag:blogger.com,1999:blog-544041532485510036.post-87596242221335520302018-08-29T06:32:00.000-07:002018-09-27T19:36:35.158-07:00the audienceThis pathetic little blog keeps limping along with almost no audience. I post all that <a href="http://wbmh.blogspot.com/2017/11/blog-post.html">profound stuff</a> but hardly anybody sees it. On the other hand, a tiny audience is still better than no audience, which seems to be the main reason it is so difficult to just shut it down. <br>
Of course, millions if not billions are in the same situation, maintaining blogs, twitter accounts and facebook, with an audience that consists mostly of bots and spammers. <br>
<br>
There are only a few stars with a large following and of course this is what motivates people to try their luck in Hollywood or Washington in the first place, to become a star and find an audience. Our "culture" today, from reality tv to YouTube, can be best explained as people desperately trying to find an audience. Of course, the current US president is at the forefront of all this; content only matters to the extent it increases the audience and what really matters in the end is the size of the crowd and not much else. <br>
<br>
In the good old times everybody had an audience and it was the best audience, in fact the best audience of all possible worlds; <i>He</i> was always watching everything. I believe Freud explained that our parents are always with us, even if they are old or dead by now, and they keep watching us as long as we live. But it seems that this kind of audience is not enough and so we are slowly but surely moving towards a <i>final solution</i>: I believe Google, NSA and Alexa are just the first steps towards a brave new world with superior AI watching us around the clock, registering and processing everything we do, say and think. <br>
I suspect, extrapolating from the present to the future, that the main purpose of this omnipresent, omniscient AI shall be targeted ads. In other words, further increasing the audience for stuff nobody would otherwise be interested in ... <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.comtag:blogger.com,1999:blog-544041532485510036.post-727896940752886962018-07-12T07:46:00.000-07:002018-07-17T10:13:51.099-07:00testingLet us assume a hypothetical disease which afflicts people with 10% probability (i.e. there is a 10% chance that I have this disease right now). <br>
Let us also assume a hypothetical test for this disease with 90% accuracy (i.e. in 9 out of 10 cases it correctly determines if somebody has the disease or not). <br>
Finally, let us assume that I have just been tested and the result came back positive. <br>
What is the probability that I actually have this disease? <br>
<br>
added later: The answer is in the comments. <br>
This kind of calculation should be interesting to doctors and their patients; but I was actually thinking about the stock market when I came up with it. <br>
I assume investors would like to avoid market crashes and severe drawdowns, but they are quite rare: 1974, 1987, 2000, 2008 come to my mind. So they seem to happen (on average) more than ten years apart and usually the "crash phase" lasts for a few months only. In other words, the probability that a particular month will experience a "crash" is well below 10%. Therefore, if an investor wants to avoid those "disease months" consistently, she needs a predictor with accuracy much better than 90%. <br>
<br>
added even later: Using Bayes' formula, one would calculate p(S|P) as probability to be Sick conditional on the test being Positive as
p(P|S) * p(S) / p(P) <br>
In my experience (I have asked this kind of question several times in job interviews), if people have a problem with it, the problem is usually with the denominator; i.e. p(P) = p(P|S)*p(S) + p(P|N)*p(N), with N denoting Non-sick. <br>
So let me help the Bayesians a little bit: It is usually more intuitive to calculate the ratio p(S|P) / p(N|P) because then p(P) falls out of the equation.<br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com8tag:blogger.com,1999:blog-544041532485510036.post-19764043791006468862018-07-03T14:39:00.000-07:002018-07-03T19:49:50.943-07:00homeI revived my <a href="http://wbmh42.000webhostapp.com/page1.html">homepage</a> a few days ago. <br>
It is minimalistic, but contains an incomplete archive of old <i>tsm</i> blog posts, with several broken links. <br>
Furthermore, if you want to simulate quantum gravity (*) you can do this with the programs I published there. <br>
<br>
The web hosting is (so far) zero cost for me and comes with only a small ad at the bottom; but in order to discourage business use, the webpage is unavailable for one hour every day, this is currently set to happen between 1am and 2am ET. <br>
<br>
Over time I may post more stuff there - we shall see. <br>
<br>
<br>
(*) <small>Actually the programs calculate some statistical properties of lattice models, motivated by a search for quantum gravity. This search has not found an interesting continuum limit yet and it is unclear if and what it has to do with the correct quantum theory of gravitation ...</small> <br>
<br>
Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com4tag:blogger.com,1999:blog-544041532485510036.post-55119559735641714022018-06-30T19:58:00.003-07:002018-07-01T07:43:52.014-07:00dSI am out of academia for many years, the <a href="https://arxiv.org/abs/hep-lat/0309002">last time I attended a conference</a> was 15 years ago.<br>
But I try to follow what is happening in physics and so I watched <a href="https://www.youtube.com/watch?v=PlbGhv0nmJ8">this video</a> from the Strings 2018 conference to get an idea or at least a glimpse of the current state of string theory. (x)<br>
One issue that got some attention was the problem to find solutions corresponding to de Sitter space (dS). <br>
<br>
It is already difficult to formulate quantum field theory in dS, which describes an exponentially expanding universe.
In dS there is no positive conserved energy, an observer cannot witness the final state of the universe due to the horizon and therefore it is unclear how to define an S-matrix. It is believed that in dS entropy is finite and therefore it only allows for a finite number of degrees of freedom, while quantum field theory seems to have an infinite number.<br>
And last but not least it seems that one cannot have (unbroken) susy, because there is no global timelike Killing vector.<br>
One attempt to quantize a scalar field in dS is described <a href="https://www.sciencedirect.com/science/article/pii/S0370269315005018">in this paper</a>. <br>
<br>
Recently, <a href="https://arxiv.org/abs/1804.01120">the question has been asked</a> "what if string theory has no de Sitter vacua?". See also <a href="https://arxiv.org/abs/1806.08362">Vafa et al.</a> and <a href="https://plus.google.com/+UrsSchreiber/posts/EnKEJ4z9S4R">Urs Schreiber's comment</a>. <br>
<br>
At Strings 2018, Cumrun Vafa <a href="https://www.youtube.com/watch?v=fU8sJRCRz24&t=1904s">talked about his recent paper</a> and proposed a conjecture, which suggests <a href="https://arxiv.org/abs/1806.09718">a constraint on possible cosmological solutions</a>. If we assume that this conjecture is indeed correct (*), it would follow that we live in a universe
which (currently) looks like dS, but "dark energy" would really be a manifestation of "quintessence", i.e. a slowly changing scalar field, and at some point in the future a phase transition would end it all.<br>
<br>
(x) <small>I really liked the Maxwell quotes.</small> <br>
<br>
(*)<small>Perhaps it is worth emphasizing that at this point none of it is known for sure and, as one would expect, <a href="http://www.math.columbia.edu/~woit/wordpress/?p=10408">Peter Woit pointed that out</a>.</small><br>
<br>
<br>
added later: In his comment Urs Schreiber writes that "KKLT [..] is in the process of being abandoned for being plainly mathematically wrong". I don't think we know that. <br>
The <a href="https://physics.stackexchange.com/questions/3141/can-has-string-theory-solved-cosmological-constant-problem/3142#3142">KKLT construction</a> adds "antibranes" to AdS vacua to arrive at a dS solution. It <a href="https://arxiv.org/abs/1707.08678">has been shown in one particular case</a> that this does not really work, but in general <a href="https://arxiv.org/abs/1805.00944">it is not obvious</a> yet that it fails.<br>
Let me be very clear that I do not really know what I am talking about - just like many string theorists. <br>
<br>Wolfganghttp://www.blogger.com/profile/07086991199438418163noreply@blogger.com1